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@georgi-clan.de> Reviewed-on: http://review.coreboot.org/5775 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
This commit is contained in:
parent
fadbe5f657
commit
e47477e52c
12
Makefile
12
Makefile
|
@ -114,18 +114,6 @@ CC:=clang -m32 -mno-mmx -mno-sse -no-integrated-as
|
||||||
HOSTCC:=clang
|
HOSTCC:=clang
|
||||||
endif
|
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_BIN := $(CCACHE) $(ROMCC_BIN)
|
|
||||||
endif
|
|
||||||
|
|
||||||
strip_quotes = $(subst ",,$(subst \",,$(1)))
|
strip_quotes = $(subst ",,$(subst \",,$(1)))
|
||||||
|
|
||||||
# The primary target needs to be here before we include the
|
# The primary target needs to be here before we include the
|
||||||
|
|
|
@ -19,6 +19,24 @@
|
||||||
|
|
||||||
ARCH_SUPPORTED := armv7 x86_32
|
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
|
# scan-build integration
|
||||||
ifneq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
|
ifneq ($(CCC_ANALYZER_OUTPUT_FORMAT),)
|
||||||
|
@ -28,7 +46,7 @@ export CCC_ANALYZER_ANALYSIS := -analyzer-opt-analyze-headers
|
||||||
endif
|
endif
|
||||||
|
|
||||||
$(foreach arch,$(ARCH_SUPPORTED), \
|
$(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)
|
HOSTCC:=CCC_CC="$(HOSTCC)" $(CC)
|
||||||
HOSTCXX:=CCC_CXX="$(HOSTCXX)" $(CXX)
|
HOSTCXX:=CCC_CXX="$(HOSTCXX)" $(CXX)
|
||||||
|
|
Loading…
Reference in New Issue