We added -mno-strict-align in commit f036b3681962 (powerpc: Work around little
endian gcc bug) to fix gcc bug http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57134

Clang doesn't understand it. We need to use a conditional because we can't use 
the
simpler call cc-option here.

Signed-off-by: Anton Blanchard <an...@samba.org>
---
 arch/powerpc/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile
index 7c08b4e..9cf7c7c 100644
--- a/arch/powerpc/Makefile
+++ b/arch/powerpc/Makefile
@@ -65,7 +65,10 @@ endif
 
 
 ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
-override CC    += -mlittle-endian -mno-strict-align
+override CC    += -mlittle-endian
+ifneq ($(COMPILER),clang)
+override CC    += -mno-strict-align
+endif
 override AS    += -mlittle-endian
 override LD    += -EL
 override CROSS32CC += -mlittle-endian
-- 
2.1.4

_______________________________________________
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev

Reply via email to