Strony

wtorek, 26 lutego 2008

ccache in gentoo - It's realy easy!

I tried to use ccache some time ago, but without success. Today was the second time, and it started to work, in just few simple steps.

1. check the portage version (because only versions 2.0.46-r11 or higher are supported)
emerge --version

2. emerge ccache
emerge -v dev-util/ccache

3. Find your CHOST
emerge --info |grep -e CHOST

4. Insert your CHOST value end envoke this command
ccache-config --install-links i686-pc-linux-gnu

5. Edit /etc/make.conf and insert there
FEATURES="ccache"
CCACHE_DIR="/var/tmp/ccache"
CCACHE_SIZE="2G"

6. emerge or reemerge something (for testing)... whatever, maybe sth non-important
7. then check if ccache works by invoking:

CCACHE DIR="/var/tmp/ccache" ccache -s

you should get sth like this

cache directory /var/tmp/ccache
cache hit 13
cache miss 270
called for link 7
compile failed 20
preprocessor error 11
not a C/C++ file 5
autoconf compile/link 174
no input file 33
files in cache 540
cache size 1.5 Mbytes
max cache size 2.0 Gbytes

0 komentarze: