ccache: add option to let set cache size (default now 10GB)

Signed-off-by: Stephan Raue <stephan@openelec.tv>
This commit is contained in:
Stephan Raue 2011-07-08 14:39:23 +02:00
parent 56ae900e50
commit 268bed238a
2 changed files with 10 additions and 0 deletions

View File

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

View File

@ -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 <<EOF
#!/bin/sh
$ROOT/$TOOLCHAIN/bin/ccache $LOCAL_CC "\$@"