ccache: Automatically set size to 8GB
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 May 2019 11:01:30 +0000 (12:01 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 28 May 2019 11:01:57 +0000 (12:01 +0100)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
lfs/ccache
make.sh

index 22e71a1..94d7bd1 100644 (file)
@@ -40,9 +40,6 @@ ifeq "$(PASS)" "1"
        CFLAGS := $(patsubst -mfunction-return=%,,$(CFLAGS))
 endif
 
-# Set max cache size to 5GB
-CFLAGS += -DDEFAULT_MAXSIZE=5242880
-
 ###############################################################################
 # Top-level Rules
 ###############################################################################
diff --git a/make.sh b/make.sh
index 2d871a2..30b42bb 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -520,6 +520,9 @@ prepareenv() {
                SYSTEM_RELEASE="${SYSTEM_RELEASE} - Development Build: $GIT_BRANCH/$GIT_LASTCOMMIT$GIT_STATUS"
                ;;
        esac
+
+       # Setup ccache cache size
+       enterchroot ccache --max-size="${CCACHE_CACHE_SIZE}" >/dev/null
 }
 
 enterchroot() {
@@ -900,6 +903,7 @@ update_contributors() {
 }
 
 # Default settings
+CCACHE_CACHE_SIZE="8G"
 ENABLE_RAMDISK="auto"
 
 # Load configuration file