buildworld + ccache trouble
Bartosz Stec
admin at kkip.pl
Mon Sep 20 13:05:34 UTC 2010
W dniu 2010-09-20 12:27, Maxim Khitrov pisze:
> On Mon, Sep 20, 2010 at 4:43 AM, Dmitry Krivenok
> <krivenok.dmitry at gmail.com> wrote:
>> Your patch works fine for me, thanks!
>> However, I don't see any performance gain when using ccache:
>>
>> Number of cache hits is very low.
>> I need to understand this...
> Make sure you have the following environment variables set:
>
> CCACHE_HASH_COMPILER=1 (2.4)
> CCACHE_COMPILERCHECK=content (3.0+)
>
It's unnecesary as long as he has
CC=/usr/local/libexec/ccache/world-cc
CXX=/usr/local/libexec/ccache/world-c++
in make.conf because these files already take care about this:
#!/bin/sh
unset CCACHE_PATH
export CCACHE_COMPILERCHECK=content
exec /usr/local/libexec/ccache/c++ "$@"
I don't know if following solution is a dirty hack or proper approach but I found this on list some months ago and it works for me. Here's a part of my make.conf which deals about world building (look at CC:= and CXX:= difference):
# default build settings for base system
.if ${.CURDIR:M*/usr/src/*} || ${.CURDIR:M*/usr/obj/*} &&
!defined(NOCCACHE)
#CC=/usr/local/libexec/ccache/world-cc
#CXX=/usr/local/libexec/ccache/world-c++
CC:=${CC:C,^cc,/usr/local/libexec/ccache/world-cc,1}
CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world-c++,1}
CFLAGS=-O2 -pipe
COPTFLAGS=-O2 -pipe
.endif
--
Bartosz Stec
More information about the freebsd-current
mailing list