From 1bb4083859b848b9ffe98ca9fdfbd10adcf482dd Mon Sep 17 00:00:00 2001 From: zbao Date: Thu, 5 Nov 2015 15:33:33 +0800 Subject: Makefile: Set HOSTCC as gcc or cc respectively The HOSTCC should be set in .xcompile, which tests the existence of gcc and cc. But the .xcompile has to be included after kconfig/Makefile. So building util/kconfig uses the seperated HOSTCC definition above it, instead of the one in .xcompile. For the system which clang is the default host compiler, gcc is not installed by default. In that case, we need to set HOSTCC as cc. Change-Id: I1e51a37c4426e2c97d36a31f26a18ab4b0d0608d Signed-off-by: Zheng Bao Reviewed-on: http://review.coreboot.org/12331 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 107f3c81e7..d8f9cc8fab 100644 --- a/Makefile +++ b/Makefile @@ -79,7 +79,7 @@ endif # Disable implicit/built-in rules to make Makefile errors fail fast. .SUFFIXES: -HOSTCC := gcc +HOSTCC := $(if $(shell type gcc 2>/dev/null), gcc, cc) HOSTCXX = g++ HOSTCFLAGS := -g HOSTCXXFLAGS := -g -- cgit v1.2.3