diff mbox series

[v2,01/11] Makefile: Put some ppc options behind try-cflag tests

Message ID 20180504021036.17027-2-joel@jms.id.au
State Accepted
Headers show
Series Support building with clang | expand

Commit Message

Joel Stanley May 4, 2018, 2:10 a.m. UTC
Clang errors out when attempting to build with these flags present.

Signed-off-by: Joel Stanley <joel@jms.id.au>
---
 Makefile.main | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
diff mbox series

Patch

diff --git a/Makefile.main b/Makefile.main
index 584d46df3758..72b68219e9ac 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -69,7 +69,7 @@  endif
 CFLAGS := -fno-strict-aliasing -pie -fpie -fno-pic -mbig-endian -m64
 CFLAGS += -mcpu=power7
 CFLAGS += -Wl,--oformat,elf64-powerpc
-CFLAGS += -ffixed-r13
+CFLAGS += $(call try-cflag,$(CC),-ffixed-r13)
 CFLAGS += $(call try-cflag,$(CC),-std=gnu11)
 ifeq ($(ELF_ABI_v2),1)
 CFLAGS += $(call try-cflag,$(CC),-mabi=elfv2)
@@ -146,9 +146,9 @@  endif
 # Do not use the floating point unit
 CFLAGS += -msoft-float
 # Do not use string instructions
-CFLAGS += -mno-string
+CFLAGS += $(call try-cflag,$(CC),-mno-string)
 # do not use load/store multiple word instrcutions
-CFLAGS += -mno-multiple
+CFLAGS += $(call try-cflag,$(CC),-mno-multiple)
 # do not use any automatic vector foo
 # While it would be safe during boot, we don't save/restore across OPAL calls
 CFLAGS += $(call try-cflag,$(CC),-mno-vsx) \