]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
ccache: Include hash of compiler specs in hashing
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 9 Jan 2016 19:48:21 +0000 (19:48 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 9 Jan 2016 19:48:48 +0000 (19:48 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/Config
make.sh

index a65b0cf4e410950858222ab0895e71a835548f93..e2396459cff3e3a5a5f9ee11149bc2bd7a2e3c12 100644 (file)
@@ -57,6 +57,9 @@ DIR_CONF    = $(LFS_BASEDIR)/config
 DIR_INFO    = $(LFS_BASEDIR)/log
 DIR_TMP     = /tmp
 
+# Add the compiler location and version and specs to the ccache hash
+CCACHE_COMPILERCHECK += $(shell gcc -dumpspecs 2>/dev/null | md5sum | cut -d ' ' -f1)
+
 ###############################################################################
 # Common Macro Definitions
 ###############################################################################
diff --git a/make.sh b/make.sh
index 95748468e3b4056a851886cbadf3e40586f4e461..0b6953346e81ea87bac27a7544973df0bbde3038 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -221,7 +221,7 @@ prepareenv() {
     # Run LFS static binary creation scripts one by one
     export CCACHE_DIR=$BASEDIR/ccache
     export CCACHE_COMPRESS=1
-    export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER}:${TARGET_ARCH}"
+    export CCACHE_COMPILERCHECK="string:toolchain-${TOOLCHAINVER} ${TARGET_ARCH}"
 
     # Remove pre-install list of installed files in case user erase some files before rebuild
     rm -f $BASEDIR/build/usr/src/lsalr 2>/dev/null