Submitter | Patrick Georgi |
---|---|
Date | 2010-09-24 20:25:41 |
Message ID | <4C9D0945.5090100@georgi-clan.de> |
Download | mbox | patch |
Permalink | /patch/1972/ |
State | Accepted |
Commit | r5836 |
Headers | show |
Comments
> I also found that we might be able to use __DATE__ and __TIME__ > (preprocessor macros) instead of calling date(1). Any opinion on that? I have a mild preference for macros over system calls. > Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Myles Watson <mylesgw@gmail.com> Thanks, Myles
Patrick Georgi wrote: > attached patch improves ccache handling (and requires ccache 3.1 to work > properly, at least in my tests). .. > I also found that we might be able to use __DATE__ and __TIME__ > (preprocessor macros) instead of calling date(1). Any opinion on that? Go for it! > Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de> Acked-by: Peter Stuge <peter@stuge.se>
Patch
Index: Makefile =================================================================== --- Makefile (Revision 5835) +++ Makefile (Arbeitskopie) @@ -88,7 +88,7 @@ else -include $(top)/.config +include $(HAVE_DOTCONFIG) ifneq ($(INNER_SCANBUILD),y) ifeq ($(CONFIG_COMPILER_LLVM_CLANG),y) @@ -98,10 +98,11 @@ endif ifeq ($(CONFIG_CCACHE),y) -CCACHE:=CCACHE_COMPILERCHECK=content $(wildcard $(addsuffix /ccache,$(subst :, ,$(PATH)))) +CCACHE:=$(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)
Hi, attached patch improves ccache handling (and requires ccache 3.1 to work properly, at least in my tests). coreboot file names are now normalized to the base directory before hashing, allowing multiple trees to share the same cache more efficiently. This will greatly benefit the build bot. It also fixes a bug ($(CCACHE) was never empty, so the test for the existence of ccache never failed) While we're at it, remove a redundant explicit use of ".config", to allow to use config files of a different name slightly more easily in the future. The only thing that's accountable for cache misses on a seeded cache is now the date/time values in config.h - I tested that by replacing them with bogus values, but the runtime benefit was negligible. I also found that we might be able to use __DATE__ and __TIME__ (preprocessor macros) instead of calling date(1). Any opinion on that? Signed-off-by: Patrick Georgi <patrick.georgi@coresystems.de>