summaryrefslogtreecommitdiffstats
path: root/arch/ppc/Makefile
diff options
context:
space:
mode:
authorSascha Hauer <s.hauer@pengutronix.de>2020-04-27 21:12:30 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2020-04-27 21:15:22 +0200
commit15d46bac2280def447c7fd74686d44d938c24556 (patch)
tree3d913222a4a2e0efbde33067b6a23598e3ace501 /arch/ppc/Makefile
parent1f69e9477758309cde0a2791a0a4743c32478d6f (diff)
downloadbarebox-15d46bac2280def447c7fd74686d44d938c24556.tar.gz
barebox-15d46bac2280def447c7fd74686d44d938c24556.tar.xz
ppc: Test for compiler options
The -mno-spe and -mspe=no options are not available on all compilers. Call cc-option to set them only when they exist. Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'arch/ppc/Makefile')
-rw-r--r--arch/ppc/Makefile5
1 files changed, 4 insertions, 1 deletions
diff --git a/arch/ppc/Makefile b/arch/ppc/Makefile
index ebf60edede..8b0c0b4758 100644
--- a/arch/ppc/Makefile
+++ b/arch/ppc/Makefile
@@ -2,7 +2,10 @@ KBUILD_DEFCONFIG := p2020rdb_defconfig
CPPFLAGS += -ffixed-r14 -m32 \
-meabi -D __PPC__ -D CONFIG_PPC \
- -fno-strict-aliasing -mno-spe -mspe=no
+ -fno-strict-aliasing
+
+CPPFLAGS += $(call cc-option,-mno-spe)
+CPPFLAGS += $(call cc-option,-mspe=no)
ifdef CONFIG_RELOCATABLE
CPPFLAGS += -fPIC -mrelocatable