summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorPatrick Georgi <patrick@georgi-clan.de>2014-05-14 21:05:35 +0200
committerPatrick Georgi <patrick@georgi-clan.de>2014-05-26 09:23:55 +0200
commitcc84a001b8b71d457f30e5520c1583bbd297d691 (patch)
treebbc17cd3ca8ea102253ff59f010c6d4cf0646d4d /Makefile
parent20ea04034dd1d2a1660e6d5fc9f5e8bc6c7859f4 (diff)
downloadcoreboot-cc84a001b8b71d457f30e5520c1583bbd297d691.tar.xz
build system: re-enable clang use
Change-Id: I6e07fdec449d0b259d77986f65a60aa36d367cc8 Signed-off-by: Patrick Georgi <patrick@georgi-clan.de> Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com> Reviewed-on: http://review.coreboot.org/5747 Tested-by: build bot (Jenkins)
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile24
1 files changed, 21 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index cc2d27ce7f..195bfe69dc 100644
--- a/Makefile
+++ b/Makefile
@@ -107,13 +107,31 @@ else
include $(HAVE_DOTCONFIG)
-include toolchain.inc
-
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
-CC:=clang -m32 -mno-mmx -mno-sse -no-integrated-as
+# FIXME: armv7/aarch64 won't build right now
+CFLAGS_x86_32 = -no-integrated-as -Qunused-arguments -target i386-elf -m32
+CC_x86_32:=clang
+
+ifneq ($(CONFIG_MMX),y)
+CFLAGS_x86_32 += -mno-mmx
+endif
+
+# FIXME: we end up with conflicting flags with this, not clear on this part.
+#ifneq ($(CONFIG_SSE),y)
+#CFLAGS_x86_32 += -mno-sse
+#endif
+
+CFLAGS_armv7 = -no-integrated-as -Qunused-arguments -target armv7-eabi -ccc-gcc-name $(CC_armv7)
+CC_armv7:=clang
+
+CFLAGS_aarch64 = -no-integrated-as -Qunused-arguments -target aarch64-eabi -ccc-gcc-name $(CC_aarch64)
+CC_aarch64:=clang
+
HOSTCC:=clang
endif
+include toolchain.inc
+
strip_quotes = $(subst ",,$(subst \",,$(1)))
# The primary target needs to be here before we include the