Makefile: HOSTCC set too late in clang builds
Currently we set HOSTCC=clang a little late meaning some minor bits
(utils/kconfig) are built with GCC. Move the assignment up the Makefile.
Change-Id: Ic72ad808eba0c0bf508bde34fb9bf0390c0b1d4d
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6140
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
diff --git a/Makefile b/Makefile
index 67c43e9..c8cad4f 100644
--- a/Makefile
+++ b/Makefile
@@ -69,6 +69,9 @@
endif
HOSTCC = gcc
+ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
+HOSTCC := clang
+endif
HOSTCXX = g++
HOSTCFLAGS := -g
HOSTCXXFLAGS := -g
@@ -126,8 +129,6 @@
CFLAGS_aarch64 = -no-integrated-as -Qunused-arguments -target aarch64-eabi -ccc-gcc-name $(CC_aarch64)
CC_aarch64:=clang
-
-HOSTCC:=clang
endif
include toolchain.inc