Skip to contentSkip to conversation

arm: rmobile: Support build with gcc-4.6 or later

PATCH New Nobuhiro Iwamatsu 2 participants 3 messages Jul 6, 2012 – Jul 19, 2012

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: rmobile: Support build with gcc-4.6 or later

Latest rmobile code was tested by using old gcc (gcc-4.4). When we use gcc-4.6 (or later), the build is made, but does not work. This solves a problem not to work by add -march=armv5 to compiple option when we built in gcc-4.6 (or later).
I tested by linaro's compiler version 2012.04-20120426.

---
 arch/arm/cpu/armv7/rmobile/config.mk       |   26 ++++++++++++++++++++++++++
 arch/arm/cpu/armv7/rmobile/lowlevel_init.S |    2 --
 2 files changed, 26 insertions(+), 2 deletions(-)
 create mode 100644 arch/arm/cpu/armv7/rmobile/config.mk
arch/arm/cpu/armv7/rmobile/config.mk new file +26 -0
new file mode 100644
index 0000000..1da0227
@@ -0,0 +1,26 @@
+#
+# (C) Copyright 2002
+# Gary Jennejohn, DENX Software Engineering, <[email protected]>
+#
+# See file CREDITS for list of people who contributed to this
+# project.
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License as
+# published by the Free Software Foundation; either version 2 of
+# the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston,
+# MA 02111-1307 USA
+#
+PLATFORM_RELFLAGS += -fno-common -ffixed-r8 -msoft-float
+
+# Make ARMv5 to allow more compilers to work, even though its v7a.
+PLATFORM_CPPFLAGS += -march=armv5
arch/arm/cpu/armv7/rmobile/lowlevel_init.S +0 -2
index 4f2ed02..daf6659 100644
@@ -49,8 +49,6 @@ wait_interrupt:
 	str     r2, [r1]
 
 wait_loop:
-	wfi
-
 	ldr		r2, [r1, #0xC]
 	str		r2, [r1, #0x10]
 
Signature · 1 line
1.7.10
#1 lore raw

PATCH 1/1 arm: rmobile: Support build with gcc-4.6 or later

Hello, Iwamatsu-san

Quoted 5 lines · Nobuhiro Iwamatsu

Latest rmobile code was tested by using old gcc (gcc-4.4). When we use gcc-4.6 (or later), the build is made, but does not work. This solves a problem not to work by add -march=armv5 to compiple option when we built in gcc-4.6 (or later).
I tested by linaro's compiler version 2012.04-20120426.

Yes. I know recent gcc causes problem because of unaligned access. There are 2 different proposals, but neither accepted.

[PATCH] arm: enable unaligned access on ARMv7
http://lists.denx.de/pipermail/u-boot/2012-June/125754.html

[PATCH] arm: armv7: add compile option -mno-unaligned-access if available
http://lists.denx.de/pipermail/u-boot/2012-July/127260.html

This patch is the third one.

arch/arm/cpu/armv7/rmobile/lowlevel_init.S wait_interrupt: · line 53

Quoted 10 lines
arch/arm/cpu/armv7/rmobile/lowlevel_init.S +0 -2
@@ -49,8 +49,6 @@ wait_interrupt:
  	str     r2, [r1]
 
  wait_loop:
-	wfi
-
  	ldr		r2, [r1, #0xC]
  	str		r2, [r1, #0x10]

I know "wfi" instruction causes compile error in -march=armv5. Without this, it works but not so good because 2nd CPU wastes cycles.

I wonder, is there any cheat such as ".word 0x...." (putting instruction code directly) or something.

#2 lore raw

PATCH 1/1 arm: rmobile: Support build with gcc-4.6 or later

Hi,

Thnak you for your comment.

2012/7/6 Tetsuyuki Kobayashi <[email protected]>:

Quoted 34 lines

Hello, Iwamatsu-san

Quoted 5 lines · Nobuhiro Iwamatsu

Latest rmobile code was tested by using old gcc (gcc-4.4). When we use gcc-4.6 (or later), the build is made, but does not work. This solves a problem not to work by add -march=armv5 to compiple option when we built in gcc-4.6 (or later).
I tested by linaro's compiler version 2012.04-20120426.

Yes. I know recent gcc causes problem because of unaligned access. There are 2 different proposals, but neither accepted.

[PATCH] arm: enable unaligned access on ARMv7
http://lists.denx.de/pipermail/u-boot/2012-June/125754.html

[PATCH] arm: armv7: add compile option -mno-unaligned-access if available
http://lists.denx.de/pipermail/u-boot/2012-July/127260.html

This patch is the third one.

arch/arm/cpu/armv7/rmobile/lowlevel_init.S wait_interrupt: · line 53

Quoted 10 lines
arch/arm/cpu/armv7/rmobile/lowlevel_init.S +0 -2
@@ -49,8 +49,6 @@ wait_interrupt:
      str     r2, [r1]
 
  wait_loop:
-     wfi
-
      ldr             r2, [r1, #0xC]
      str             r2, [r1, #0x10]

I know "wfi" instruction causes compile error in -march=armv5. Without this, it works but not so good because 2nd CPU wastes cycles.

Quoted 2 lines

I wonder, is there any cheat such as ".word 0x...." (putting instruction code directly) or something.

I see. I'll fix.

Thanks,
Nobuhiro

Signature · 1 line
Nobuhiro Iwamatsu