Date: Mon, 20 Sep 2010 15:05:24 +0200 From: Bartosz Stec <admin@kkip.pl> To: Maxim Khitrov <max@mxcrypt.com> Cc: freebsd-current@freebsd.org, Dmitry Krivenok <krivenok.dmitry@gmail.com> Subject: Re: buildworld + ccache trouble Message-ID: <4C975C14.1010905@kkip.pl> In-Reply-To: <AANLkTim2uB4BVFu=J234vZX-WvFdfoQUbtu0BAP%2BxCqZ@mail.gmail.com> References: <AANLkTimF79ZPE3MJeHQ=O1ismQCj916Q9kL23SBZOTL9@mail.gmail.com> <4C912926.6070409@FreeBSD.org> <AANLkTi=wKc_6ppV83Yb68hRE_E8KO4a5YCzp50N6L64b@mail.gmail.com> <AANLkTim2uB4BVFu=J234vZX-WvFdfoQUbtu0BAP%2BxCqZ@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
W dniu 2010-09-20 12:27, Maxim Khitrov pisze:
> On Mon, Sep 20, 2010 at 4:43 AM, Dmitry Krivenok
> <krivenok.dmitry@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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C975C14.1010905>
