From b1af6a413eb2fe8a06972c5c6a8d0448293b0196 Mon Sep 17 00:00:00 2001 From: jbu Date: Mon, 18 May 2015 20:05:16 +0200 Subject: [PATCH] xbps-src: unified ccache directory - I turns out that ccache is very well capable of recognizing different compilers and using only files stored to the cache by each compiler. - To avoid large parts of a cache becoming useless just because a compiler was rebuilt during some (bootstrap) stage, rely on the contents of the compiler binary for identification instead of mtime + size. --- xbps-src | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/xbps-src b/xbps-src index 0c3d77cb969..21b3c586fa1 100755 --- a/xbps-src +++ b/xbps-src @@ -536,7 +536,10 @@ else export PATH="$MYPATH" if [ -n "$XBPS_CCACHE" ]; then CCACHEPATH="/usr/lib/ccache/bin" - export CCACHE_DIR="$XBPS_HOSTDIR/ccache-${XBPS_CROSS_BUILD:-${XBPS_MACHINE}}" + export CCACHE_DIR="$XBPS_HOSTDIR/ccache" + # Avoid not using cached files just due to compiler mtime + # changes when e.g. bootstrapping + export CCACHE_COMPILERCHECK=content export PATH="$CCACHEPATH:$PATH" mkdir -p $CCACHE_DIR fi