From owner-freebsd-current@FreeBSD.ORG Mon Sep 20 13:05:34 2010 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D59F6106566C for ; Mon, 20 Sep 2010 13:05:34 +0000 (UTC) (envelope-from admin@kkip.pl) Received: from mainframe.kkip.pl (kkip.pl [87.105.164.78]) by mx1.freebsd.org (Postfix) with ESMTP id 2DF4D8FC1A for ; Mon, 20 Sep 2010 13:05:33 +0000 (UTC) Received: from mb01.admin.lan.kkip.pl ([10.66.3.0]) by mainframe.kkip.pl with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.72 (FreeBSD)) (envelope-from ) id 1Oxg3g-000Eo6-5k; Mon, 20 Sep 2010 15:05:31 +0200 Message-ID: <4C975C14.1010905@kkip.pl> Date: Mon, 20 Sep 2010 15:05:24 +0200 From: Bartosz Stec User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; pl; rv:1.9.2.9) Gecko/20100825 Lightning/1.0b2 Thunderbird/3.1.3 MIME-Version: 1.0 To: Maxim Khitrov References: <4C912926.6070409@FreeBSD.org> In-Reply-To: X-Authenticated-User: admin@kkip.pl X-Authenticator: plain X-Sender-Verify: SUCCEEDED (sender exists & accepts mail) X-Spam-Score: -8.1 X-Spam-Score-Int: -80 X-Exim-Version: 4.72 (build at 10-Jun-2010 13:05:33) X-Date: 2010-09-20 15:05:31 X-Connected-IP: 10.66.3.0:4591 X-Message-Linecount: 135 X-Body-Linecount: 120 X-Message-Size: 4952 X-Body-Size: 4095 X-Received-Count: 1 X-Recipient-Count: 3 X-Local-Recipient-Count: 3 X-Local-Recipient-Defer-Count: 0 X-Local-Recipient-Fail-Count: 0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-current@freebsd.org, Dmitry Krivenok Subject: Re: buildworld + ccache trouble X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 20 Sep 2010 13:05:34 -0000 W dniu 2010-09-20 12:27, Maxim Khitrov pisze: > On Mon, Sep 20, 2010 at 4:43 AM, Dmitry Krivenok > 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