[coreboot-gerrit] Patch set updated for coreboot: Makefile: Set HOSTCC as gcc, cc or clang respectively

Zheng Bao (zheng.bao@amd.com) gerrit at coreboot.org
Sat Nov 14 11:31:25 CET 2015


Zheng Bao (zheng.bao at amd.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/12331

-gerrit

commit 8df5014b8201f71484727f90b331ccdefa3ab8f6
Author: zbao <fishbaozi at gmail.com>
Date:   Thu Nov 5 15:33:33 2015 +0800

    Makefile: Set HOSTCC as gcc, cc or clang 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 or clang.
    
    Change-Id: I1e51a37c4426e2c97d36a31f26a18ab4b0d0608d
    Signed-off-by: Zheng Bao <fishbaozi at gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 421e919..0ea8f0e 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 := $(or $(shell command -v gcc), $(shell command -v cc), $(shell command -v clang))
 HOSTCXX = g++
 HOSTCFLAGS := -g
 HOSTCXXFLAGS := -g



More information about the coreboot-gerrit mailing list