[U-Boot] [RFC] ARMv7: Build cache_v7.c with -O1 to avoid gcc6 breakage

Hi All,
Here is a workaround for a problem I've been debugging today, for details see: https://bugzilla.redhat.com/show_bug.cgi?id=1318788
We're still investigating what the real problem is in the mean time I wanted to share this workaround in case others are hitting the same problem.
Regards,
Hans

It seems that building cache_v7.c with gcc6 with -O2 or -Os results in an unreliable u-boot (only boots the kernel some of the time), at least on sunxi boards. For details see:
https://bugzilla.redhat.com/show_bug.cgi?id=1318788
This commit adds -O1 at the end of the CFLAGS when building cache_v7.c working around this.
Signed-off-by: Hans de Goede hdegoede@redhat.com --- arch/arm/cpu/armv7/Makefile | 1 + 1 file changed, 1 insertion(+)
diff --git a/arch/arm/cpu/armv7/Makefile b/arch/arm/cpu/armv7/Makefile index 45f346c..45a49fe 100644 --- a/arch/arm/cpu/armv7/Makefile +++ b/arch/arm/cpu/armv7/Makefile @@ -8,6 +8,7 @@ extra-y := start.o
obj-y += cache_v7.o +CFLAGS_cache_v7.o := $(KBUILD_CFLAGS) -O1
obj-y += cpu.o cp15.o obj-y += syslib.o

On Mon, Mar 21, 2016 at 05:08:34PM +0100, Hans de Goede wrote:
It seems that building cache_v7.c with gcc6 with -O2 or -Os results in an unreliable u-boot (only boots the kernel some of the time), at least on sunxi boards. For details see:
https://bugzilla.redhat.com/show_bug.cgi?id=1318788
This commit adds -O1 at the end of the CFLAGS when building cache_v7.c working around this.
Signed-off-by: Hans de Goede hdegoede@redhat.com
I've marked this as RFC in patchwork for now (since 0/1 was RFC) and cc'd myself on the bugzilla as well. We'll pay it by ear for v2016.05 release and probably not include this work-around in -rc1.
participants (2)
-
Hans de Goede
-
Tom Rini