aboutsummaryrefslogtreecommitdiff
path: root/package/ccache/ccache.mk
diff options
context:
space:
mode:
Diffstat (limited to 'package/ccache/ccache.mk')
-rw-r--r--package/ccache/ccache.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/package/ccache/ccache.mk b/package/ccache/ccache.mk
index 650290dced..df92c5e994 100644
--- a/package/ccache/ccache.mk
+++ b/package/ccache/ccache.mk
@@ -30,9 +30,12 @@ HOST_CCACHE_CONF_OPT += ccache_cv_zlib_1_2_3=no
# the compiler, because in the context of Buildroot, that completely
# defeats the purpose of ccache. Of course, that leaves the user
# responsible for purging its cache when the compiler changes.
+# - Change hard-coded last-ditch default to match path in .config, to avoid
+# the need to specify BR_CACHE_DIR when invoking ccache directly.
define HOST_CCACHE_PATCH_CONFIGURATION
sed -i 's,getenv("CCACHE_DIR"),getenv("BR_CACHE_DIR"),' $(@D)/ccache.c
sed -i 's,getenv("CCACHE_COMPILERCHECK"),"none",' $(@D)/ccache.c
+ sed -i 's,"%s/.ccache","$(BR_CACHE_DIR)",' $(@D)/ccache.c
endef
HOST_CCACHE_POST_CONFIGURE_HOOKS += \