From: Michael Tremer Date: Wed, 29 May 2019 14:28:45 +0000 (+0100) Subject: make.sh: Have a ccache for each architecture X-Git-Tag: v2.23-core133~44 X-Git-Url: http://git.ipfire.org/?p=ipfire-2.x.git;a=commitdiff_plain;h=3608d485567284b52c17754c7f8809ee793db7cc make.sh: Have a ccache for each architecture It does not make much sense to mix architectures into a single ccache: * There is never going to be a match * The cache gets bigger and therefore slower * If both architectures are being compiled one after the other and the cache hits its maximum size, cached but still needed content will be dropped * Only both can be deleted together This small change splits this into multiple caches. One per architecture. Therefore we should be more efficient on builders that build for multiple architectures. Signed-off-by: Michael Tremer --- diff --git a/make.sh b/make.sh index e9630d335f..f2904df08e 100755 --- a/make.sh +++ b/make.sh @@ -469,7 +469,7 @@ prepareenv() { mkdir -p "${BASEDIR}/build${TOOLS_DIR}" 2>/dev/null mkdir -p $BASEDIR/build/{etc,usr/src} 2>/dev/null mkdir -p $BASEDIR/build/{dev/{shm,pts},proc,sys} - mkdir -p $BASEDIR/{cache,ccache} 2>/dev/null + mkdir -p $BASEDIR/{cache,ccache/${BUILD_ARCH}} 2>/dev/null if [ "${ENABLE_RAMDISK}" = "on" ]; then mkdir -p $BASEDIR/build/usr/src @@ -488,7 +488,7 @@ prepareenv() { mount --bind /proc $BASEDIR/build/proc mount --bind /sys $BASEDIR/build/sys mount --bind $BASEDIR/cache $BASEDIR/build/usr/src/cache - mount --bind $BASEDIR/ccache $BASEDIR/build/usr/src/ccache + mount --bind $BASEDIR/ccache/${BUILD_ARCH} $BASEDIR/build/usr/src/ccache mount --bind $BASEDIR/config $BASEDIR/build/usr/src/config mount --bind $BASEDIR/doc $BASEDIR/build/usr/src/doc mount --bind $BASEDIR/html $BASEDIR/build/usr/src/html