From 4e54a8e2d6d4286f85a38a492d34452092404b24 Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Tue, 28 May 2019 12:01:30 +0100 Subject: [PATCH] ccache: Automatically set size to 8GB Signed-off-by: Michael Tremer --- lfs/ccache | 3 --- make.sh | 4 ++++ 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/lfs/ccache b/lfs/ccache index 22e71a12dc..94d7bd149e 100644 --- a/lfs/ccache +++ b/lfs/ccache @@ -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 2d871a2cbf..30b42bbdbc 100755 --- 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 -- 2.39.2