From e24a119cceeef8ad62672fad2b92fd2f026621ab Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Sat, 17 May 2014 19:05:56 +0200 Subject: build: allow romcc to be wrapped MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Allow ccache and scan-build to wrap romcc. This works a bit different from the other compilers because we only define it later. Change-Id: I3adce91d3dde9dd50aa6a2baad5b457744f35575 Signed-off-by: Patrick Georgi Reviewed-on: http://review.coreboot.org/5773 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- Makefile | 2 +- Makefile.inc | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 3404a5199a..5c4484aed1 100644 --- a/Makefile +++ b/Makefile @@ -135,7 +135,7 @@ CCACHE:=CCACHE_COMPILERCHECK=content CCACHE_BASEDIR=$(top) $(CCACHE) CC := $(CCACHE) $(CC) HOSTCC := $(CCACHE) $(HOSTCC) HOSTCXX := $(CCACHE) $(HOSTCXX) -ROMCC := $(CCACHE) $(ROMCC) +ROMCC_BIN := $(CCACHE) $(ROMCC_BIN) endif strip_quotes = $(subst ",,$(subst \",,$(1))) diff --git a/Makefile.inc b/Makefile.inc index d098cff291..529250d9b9 100644 --- a/Makefile.inc +++ b/Makefile.inc @@ -280,8 +280,11 @@ ifeq ($(_WINCHECK),Cygwin) STACK=-Wl,--stack,16384000 endif -ROMCC:= $(objutil)/romcc/romcc -$(ROMCC): $(top)/util/romcc/romcc.c +# this allows ccache to prepend itself +# (ccache handling happens first) +ROMCC_BIN= $(objutil)/romcc/romcc +ROMCC?=$(ROMCC_BIN) +$(ROMCC_BIN): $(top)/util/romcc/romcc.c @printf " HOSTCC $(subst $(obj)/,,$(@)) (this may take a while)\n" @# Note: Adding -O2 here might cause problems. For details see: @# http://www.coreboot.org/pipermail/coreboot/2010-February/055825.html -- cgit v1.2.3