Makefile.inc: Detect if a working clang binary exists before set

Let us not assume the 'clang' binary exists and is working just because
the user selected it in .config

Change-Id: Iad3cbf4a7cda0e1c4d435fbe426b7247233973ea
Signed-off-by: Edward O'Callaghan <eocallaghan@alterapraxis.com>
Reviewed-on: http://review.coreboot.org/6141
Tested-by: build bot (Jenkins)
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
This commit is contained in:
Edward O'Callaghan 2014-06-27 18:22:53 +10:00
parent 480790b593
commit 2c342f5080
1 changed files with 1 additions and 1 deletions

View File

@ -30,7 +30,7 @@ ifneq ($(NOCOMPILE),1)
ifneq ($(CONFIG_ANY_TOOLCHAIN),y)
_toolchain=$(shell $(CC_x86_32) -v 2>&1 |grep -q "gcc version .*coreboot toolchain" && echo coreboot)
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
_toolchain=coreboot
_toolchain=$(shell $(CC_x86_32) -v 2>&1 |grep -q "clang version" && echo coreboot)
endif
ifneq ($(_toolchain),coreboot)
$(error Please use the coreboot toolchain (or prove that your toolchain works))