[coreboot-gerrit] New patch to review for coreboot: e9f543f build: re-enable ccache support

Patrick Georgi (patrick@georgi-clan.de) gerrit at coreboot.org
Sat May 17 19:25:37 CEST 2014


Patrick Georgi (patrick at georgi-clan.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5775

-gerrit

commit e9f543fb5964d01813053247106b0a6a1a61e5d3
Author: Patrick Georgi <patrick at georgi-clan.de>
Date:   Sat May 17 18:38:10 2014 +0200

    build: re-enable ccache support
    
    The ccache support was mostly disabled because it
    didn't hook onto most compilers anymore.
    
    Caveat: ccache and scan-build don't work together since
    scan-build doesn't like arguments in its compiler command
    line (eg. "ccache gcc").
    
    Change-Id: I7c1c6e22cb662f2b08e774ea484ac1c412fdd2db
    Signed-off-by: Patrick Georgi <patrick at georgi-clan.de>
---
 Makefile      | 12 ------------
 toolchain.inc | 20 +++++++++++++++++++-
 2 files changed, 19 insertions(+), 13 deletions(-)

diff --git a/Makefile b/Makefile
index a1be172..cc2d27c 100644
--- a/Makefile
+++ b/Makefile
@@ -114,18 +114,6 @@ CC:=clang -m32 -mno-mmx -mno-sse -no-integrated-as
 HOSTCC:=clang
 endif
 
-ifeq ($(CONFIG_CCACHE),y)
-CCACHE:=$(word 1,$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))))
-ifeq ($(CCACHE),)
-$(error ccache selected, but not found in PATH)
-endif
-CCACHE:=CCACHE_COMPILERCHECK=content CCACHE_BASEDIR=$(top) $(CCACHE)
-CC := $(CCACHE) $(CC)
-HOSTCC := $(CCACHE) $(HOSTCC)
-HOSTCXX := $(CCACHE) $(HOSTCXX)
-ROMCC := $(CCACHE) $(ROMCC)
-endif
-
 strip_quotes = $(subst ",,$(subst \",,$(1)))
 
 # The primary target needs to be here before we include the
diff --git a/toolchain.inc b/toolchain.inc
index bfa604b..568097e 100644
--- a/toolchain.inc
+++ b/toolchain.inc
@@ -19,6 +19,24 @@
 
 ARCH_SUPPORTED := armv7 x86_32
 
+# ccache integration
+ifeq ($(CONFIG_CCACHE),y)
+
+CCACHE:=$(word 1,$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))))
+ifeq ($(CCACHE),)
+$(error ccache selected, but not found in PATH)
+endif
+
+export CCACHE_COMPILERCHECK=content
+export CCACHE_BASEDIR=$(top)
+
+$(foreach arch,$(ARCH_SUPPORTED), \
+	$(eval CC_$(arch):=$(CCACHE) $(CC_$(arch))))
+
+HOSTCC:=$(CCACHE) $(HOSTCC)
+HOSTCXX:=$(CCACHE) $(HOSTCXX)
+ROMCC=$(CCACHE) $(ROMCC_BIN)
+endif
 
 # scan-build integration
 ifneq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
@@ -28,7 +46,7 @@ export CCC_ANALYZER_ANALYSIS := -analyzer-opt-analyze-headers
 endif
 
 $(foreach arch,$(ARCH_SUPPORTED), \
-	$(eval CC_$(arch):=CCC_CC=$(CC_$(arch)) $(CC) ))
+	$(eval CC_$(arch):=CCC_CC="$(CC_$(arch))" $(CC) ))
 
 HOSTCC:=CCC_CC="$(HOSTCC)" $(CC)
 HOSTCXX:=CCC_CXX="$(HOSTCXX)" $(CXX)



More information about the coreboot-gerrit mailing list