[Skiboot] [PATCH 5/7] Makefile: be precise about clang target

Joel Stanley joel at jms.id.au
Tue May 8 20:23:01 AEST 2018


While CROSS can be set to a ppc64le toolchian, we don't want to build
for that target. Hardcode the target to powerpc64-linux-gnu.

Signed-off-by: Joel Stanley <joel at jms.id.au>
---
 Makefile.main | 11 +----------
 1 file changed, 1 insertion(+), 10 deletions(-)

diff --git a/Makefile.main b/Makefile.main
index 92dd92b826b1..6e0e4be7cf51 100644
--- a/Makefile.main
+++ b/Makefile.main
@@ -146,24 +146,15 @@ AFLAGS += $(call try-cflag,$(CC),-mabi=elfv1)
 endif
 
 ifeq ($(cc-name),clang)
-ifneq ($(CROSS),)
-CLANG_TARGET    := --target=$(notdir $(CROSS:%-=%))
+CLANG_TARGET    := --target=powerpc64-linux-gnu -mcpu=pwr8
 GCC_TOOLCHAIN   := $(realpath $(dir $(shell which $(LD)))/..)
-endif
 ifneq ($(GCC_TOOLCHAIN),)
 CLANG_GCC_TC    := --gcc-toolchain=$(GCC_TOOLCHAIN)
 endif
 CFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
 AFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
-CFLAGS += $(call cc-option, -no-integrated-as)
-AFLAGS += $(call cc-option, -no-integrated-as)
-
 LDFLAGS += $(CLANG_TARGET) $(CLANG_GCC_TC)
 
-CFLAGS += -mcpu=pwr8
-LDFLAGS += -mcpu=pwr8
-ASFLAGS += -mcpu=pwr8
-
 # Workarounds
 # TODO: Fix the issues these hide, and remove them
 CFLAGS += -Wno-cast-align \
-- 
2.17.0



More information about the Skiboot mailing list