From af9710538ec1ece4819415341d303fb55c837331 Mon Sep 17 00:00:00 2001 From: Wade Berrier Date: Mon, 6 Oct 2008 19:14:41 +0000 Subject: [PATCH] ccache: -Allow user to specify custom ccache location. This allows you to build a toolchain and put it on an nfs share so other people can use the toolchain without errors about the ccache dir missing. --- toolchain/ccache/Config.in | 10 ++++++++++ toolchain/ccache/ccache.mk | 5 +++-- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/toolchain/ccache/Config.in b/toolchain/ccache/Config.in index 95f3a9c1ac..3d3e2ed50e 100644 --- a/toolchain/ccache/Config.in +++ b/toolchain/ccache/Config.in @@ -7,3 +7,13 @@ config BR2_CCACHE help Enable ccache support? +config BR2_CCACHE_DIR + string "ccache dir location?" + depends on BR2_CCACHE + default "$(TOOL_BUILD_DIR)/ccache-$(CCACHE_VER)/cache" + help + Where ccache should store cached files. + +comment "ccache dir location? - disabled (requires ccache support)" + depends on !BR2_CCACHE + diff --git a/toolchain/ccache/ccache.mk b/toolchain/ccache/ccache.mk index 945f840569..c405e88ac7 100644 --- a/toolchain/ccache/ccache.mk +++ b/toolchain/ccache/ccache.mk @@ -24,8 +24,9 @@ $(CCACHE_DIR1)/.patched: $(CCACHE_DIR1)/.unpacked # Should probably patch things to use a relative path. $(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin-ccache\",g" \ $(CCACHE_DIR1)/execute.c - # WARNING - this will break if the toolchain build dir is deleted. - $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \ + # WARNING - this will break if the toolchain build dir is deleted + # when using the default cache dir location. + $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(BR2_CCACHE_DIR)\",g" \ $(CCACHE_DIR1)/ccache.c mkdir -p $(CCACHE_DIR1)/cache touch $@ -- 2.30.2