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 <michael.tremer@ipfire.org>
This commit is contained in:
Michael Tremer
2019-05-29 15:28:45 +01:00
parent b0ec4158f3
commit 3608d48556

View File

@@ -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