summaryrefslogtreecommitdiffstats
path: root/arch/arm/Makefile
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2022-04-08 18:01:54 +0100
committerSascha Hauer <s.hauer@pengutronix.de>2022-04-12 09:53:02 +0200
commit6e200850e2cb49ec2a5898c27375bdc2309bddc7 (patch)
tree2ec4d31a1dcd49ef692c4a3e8bbb061ef414ed44 /arch/arm/Makefile
parent7417d0a48a45b71ebffa4d6dd075905f3516a87a (diff)
downloadbarebox-6e200850e2cb49ec2a5898c27375bdc2309bddc7.tar.gz
barebox-6e200850e2cb49ec2a5898c27375bdc2309bddc7.tar.xz
ARM: fix GCC 11.x build failures for ARMv7
Building barebox for ARMv7 with GCC 11.x results in errors similar to the following: CC common/state/state_variables.o {standard input}: Assembler messages: {standard input}:1535: Error: selected processor does not support `rev r3,r3' in Thumb mode {standard input}:1576: Error: selected processor does not support `rev r3,r3' in Thumb mode Or: CC common/state/state_variables.o {standard input}: Assembler messages: {standard input}:1405: Error: selected processor does not support `rev r3,r3' in ARM mode {standard input}:1453: Error: selected processor does not support `rev r3,r3' in ARM mode The problem is that the compiler option `-march=armv7-a` is not being chosen by "arch/arm/Makefile", but rather the fallback options `-march=armv5t -Wa,-march=armv7-a` are being chosen. Appending `-msoft-float` to `KBUILD_CPPFLAGS` earlier in "arch/arm/Makefile" before the tests for supported `-march` options seems to fix the problem. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Link: https://lore.barebox.org/20220408170154.114526-1-abbotti@mev.co.uk Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/arm/Makefile')
-rw-r--r--arch/arm/Makefile3
1 files changed, 2 insertions, 1 deletions
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 610ded8a12..124a3fc40c 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -8,6 +8,7 @@ ifeq ($(CONFIG_CPU_V8),y)
KBUILD_CPPFLAGS +=$(call cc-option,-maarch64,)
else
KBUILD_CPPFLAGS +=$(call cc-option,-marm,)
+KBUILD_CPPFLAGS += -msoft-float
endif
ifeq ($(CONFIG_CPU_BIG_ENDIAN),y)
@@ -78,7 +79,7 @@ KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y)
KBUILD_AFLAGS += -include asm/unified.h
export S64 = _64
else
-KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) -msoft-float $(CFLAGS_THUMB2)
+KBUILD_CPPFLAGS += $(CFLAGS_ABI) $(arch-y) $(tune-y) $(CFLAGS_THUMB2)
KBUILD_AFLAGS += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2)
endif