From owner-freebsd-current@FreeBSD.ORG Sun Nov 20 10:12:33 2005 Return-Path: X-Original-To: freebsd-current@freebsd.org Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F2E9416A41F for ; Sun, 20 Nov 2005 10:12:32 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: from bremen.shuttle.de (bremen.shuttle.de [194.95.249.251]) by mx1.FreeBSD.org (Postfix) with ESMTP id 63DB943D45 for ; Sun, 20 Nov 2005 10:12:31 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 53E9F3B9AA; Sun, 20 Nov 2005 11:12:30 +0100 (CET) Received: from hal9000.schweikhardt.net (localhost [127.0.0.1]) by hal9000.schweikhardt.net (8.13.4/8.13.4) with ESMTP id jAKACBYm002533; Sun, 20 Nov 2005 11:12:11 +0100 (CET) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.4/8.13.4/Submit) id jAKACB6o002532; Sun, 20 Nov 2005 11:12:11 +0100 (CET) (envelope-from schweikh) Date: Sun, 20 Nov 2005 11:12:11 +0100 From: Jens Schweikhardt To: Nicolas Blais Message-ID: <20051120101211.GA746@schweikhardt.net> References: <200511141702.45491.nb_root@videotron.ca> <200511151942.04277.nb_root@videotron.ca> <20051116175853.GA899@schweikhardt.net> <200511190843.03660.nb_root@videotron.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200511190843.03660.nb_root@videotron.ca> User-Agent: Mutt/1.5.11 Cc: Steve Hodgson , Maxim.Sobolev@portaone.com, michael johnson , freebsd-current@freebsd.org Subject: Re: Using ccache for build{world, kernel} 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: Sun, 20 Nov 2005 10:12:33 -0000 On Sat, Nov 19, 2005 at 08:42:57AM -0500, Nicolas Blais wrote: ... # Okay, but is /usr/local/share/doc/ccache/ccache-howto-freebsd.txt still valid? # Such as : # To use ccache add the following to /etc/make.conf # # .if !defined(NOCCACHE) # .if ${.CURDIR:M/usr/src*} # CC=/usr/local/libexec/ccache/cc # CXX=/usr/local/libexec/ccache/c++ IIUC, this works only if CCACHE_PATH is unset. That's hard to guarantee from within a Makefile, hence I use a script for buildworlds. # .else # CC=cc # CXX=c++ Probably nothing wrong with that (unless you expect ccache to be used for non-/usr/src builds). # .endif # .else # CC=/usr/bin/cc # CXX=/usr/bin/c++ This does not look right because it ignores PATH. Someone may want to use /usr/local/bin/cc in the NOCCACHE case. I'd also use CC=cc CXX=C++ here. The author of these instructions may have a reason for it, however, that I have not thought of. # .endif # # I'm asking because I'm slightly confused (sorry) as some people tell me to not # put the block in /etc/make.conf. If I don't put anything, my .ccache folder # remains empty (therefore ccache not being used). Do you use any symlinkery to point to your real /usr/src? What does $ cd /usr/src; echo 'all: ; @echo ${.CURDIR}' | make -f - print? It's "/share/HEAD/src" on my system. Another gotcha and reason not to use the make.conf approach... # Whatever the real usage of ccache, it should be mentionned in that file, or # during 'make install' as a pkg-message. I'm thinking of writing an article about the whole issue, but as I'm in the process of moving I don't expect it to be finished this year. Ccache is not trivial to get to DTRT in each and every conceivable case. So you are entitled to your confusion :-) Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)