[U-Boot] [PATCH] arm: rmobile: Support build with gcc-4.6 or later
Tetsuyuki Kobayashi
koba at kmckk.co.jp
Fri Jul 6 10:04:16 CEST 2012
Hello, Iwamatsu-san
(2012/07/06 9:06), Nobuhiro Iwamatsu wrote:
> 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.
> --- a/arch/arm/cpu/armv7/rmobile/lowlevel_init.S
> +++ b/arch/arm/cpu/armv7/rmobile/lowlevel_init.S
> @@ -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.
More information about the U-Boot
mailing list