From 268bed238a834d4cd8206bcaa675d298978672f4 Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Fri, 8 Jul 2011 14:39:23 +0200 Subject: [PATCH] ccache: add option to let set cache size (default now 10GB) Signed-off-by: Stephan Raue --- config/options | 7 +++++++ packages/toolchain/devel/ccache/build | 3 +++ 2 files changed, 10 insertions(+) diff --git a/config/options b/config/options index d2a955d098..18d9a875e0 100644 --- a/config/options +++ b/config/options @@ -57,6 +57,13 @@ fi # multi-processor computer (like hyperthreading SMP CPU) CONCURRENCY_MAKE_LEVEL=`cat /proc/cpuinfo | grep -c '^processor[[:cntrl:]]*:'` +# cache size for ccache +# Set the maximum size of the files stored in the cache. You can specify a +# value in gigabytes, megabytes or kilobytes by appending a G, M or K to the +# value. The default is gigabytes. The actual value stored is rounded down to +# the nearest multiple of 16 kilobytes. + CCACHE_CACHE_SIZE="10G" + # forcing install of all packages (yes/no) FORCE_INSTALL="no" diff --git a/packages/toolchain/devel/ccache/build b/packages/toolchain/devel/ccache/build index 62b1844030..b09965c025 100755 --- a/packages/toolchain/devel/ccache/build +++ b/packages/toolchain/devel/ccache/build @@ -34,6 +34,9 @@ make mkdir -p $ROOT/$TOOLCHAIN/bin cp -f ccache $ROOT/$TOOLCHAIN/bin +# setup ccache + $ROOT/$TOOLCHAIN/bin/ccache --max-size=$CCACHE_CACHE_SIZE + cat > $HOST_CC <