]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
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 22e71a12dc6aceb5ff5a650d3605dc3533bf8ee7..94d7bd149e5383c76186993d699ab3531dbd6e6f 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 2d871a2cbfd38ce169e10fb1488db826be6a1a9e..30b42bbdbc7bca27e5894707dfb44f1d0e6604c7 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