Fix CCACHE handling, and make use of ccache's BASEDIR feature

Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>
Acked-by: Myles Watson <mylesgw@gmail.com>
Acked-by: Peter Stuge <peter@stuge.se>


git-svn-id: svn://svn.coreboot.org/coreboot/trunk@5836 2b7e53f0-3cfb-0310-b3e9-8179ed1497e1
This commit is contained in:
Patrick Georgi 2010-09-24 22:15:54 +00:00
parent 20979584fe
commit 977b985095
1 changed files with 3 additions and 2 deletions

View File

@ -88,7 +88,7 @@ all: config
else else
include $(top)/.config include $(HAVE_DOTCONFIG)
ifneq ($(INNER_SCANBUILD),y) ifneq ($(INNER_SCANBUILD),y)
ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y)
@ -98,10 +98,11 @@ endif
endif endif
ifeq ($(CONFIG_CCACHE),y) ifeq ($(CONFIG_CCACHE),y)
CCACHE:=CCACHE_COMPILERCHECK=content $(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))) CCACHE:=$(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH))))
ifeq ($(CCACHE),) ifeq ($(CCACHE),)
$(error ccache selected, but not found in PATH) $(error ccache selected, but not found in PATH)
endif endif
CCACHE:=CCACHE_COMPILERCHECK=content CCACHE_BASEDIR=$(top) $(CCACHE)
CC := $(CCACHE) $(CC) CC := $(CCACHE) $(CC)
HOSTCC := $(CCACHE) $(HOSTCC) HOSTCC := $(CCACHE) $(HOSTCC)
HOSTCXX := $(CCACHE) $(HOSTCXX) HOSTCXX := $(CCACHE) $(HOSTCXX)