From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 22:42:28 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 6B57616A41F for ; Tue, 15 Nov 2005 22:42:28 +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 ED12943D46 for ; Tue, 15 Nov 2005 22:42:27 +0000 (GMT) (envelope-from schweikh@schweikhardt.net) Received: by bremen.shuttle.de (Postfix, from userid 10) id 703203B904; Tue, 15 Nov 2005 23:42:26 +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 jAFMgCH2032498; Tue, 15 Nov 2005 23:42:12 +0100 (CET) (envelope-from schweikh@hal9000.schweikhardt.net) Received: (from schweikh@localhost) by hal9000.schweikhardt.net (8.13.4/8.13.4/Submit) id jAFMgC4L032497; Tue, 15 Nov 2005 23:42:12 +0100 (CET) (envelope-from schweikh) Date: Tue, 15 Nov 2005 23:42:12 +0100 From: Jens Schweikhardt To: Steve Hodgson Message-ID: <20051115224212.GF1783@schweikhardt.net> References: <200511141702.45491.nb_root@videotron.ca> <20051115183647.GA1783@schweikhardt.net> <20051115211418.GE1783@schweikhardt.net> <200511151657.44716.nb_root@videotron.ca> <437A5CF5.4020203@acidy.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <437A5CF5.4020203@acidy.com> User-Agent: Mutt/1.5.11 Cc: freebsd-current@freebsd.org, Nicolas Blais 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: Tue, 15 Nov 2005 22:42:28 -0000 Steve et al, # So would the following form a better set of instructions for the port # (given the above patch is merged)? Might not, because... # 1. don't follow the instructions about changing your PATH and setting # CCACHE_PATH in /etc/profile or cshrc # 2. use the following in /etc/make.conf # # .if !defined(NOCCACHE) # .if ${.CURDIR:M/usr/src*} ...I'm not sure whether the CURDIR always is under /usr/src; it might change to somewhere under /usr/obj. Haven't investigated, though. # CC=CCACHE_NOHASH_SIZE_MTIME=y /usr/local/bin/ccache cc # CXX=CCACHE_NOHASH_SIZE_MTIME=y /usr/local/bin/ccache c++ # .else # CC=/usr/local/bin/ccache cc # CXX=/usr/local/bin/ccache c++ # .endif # .endif # # (untested though) I would simply not mess with make.conf and obfuscated .CURDIR magic, but rather write a little and obvious shell script "build-sys" along #!/bin/sh set -e unset CCACHE_PATH # Make ccache search PATH for the real compilers. CC="/usr/local/bin/ccache cc" CXX="/usr/local/bin/ccache c++" export CCACHE_NOHASH_SIZE_MTIME=yes cd /usr/src make CC="${CC}" CXX="${CXX}" buildworld make CC="${CC}" CXX="${CXX}" buildkernel Does this work for you? BTW, you can always disable ccache with export CCACHE_DISABLE=yes. Regards, Jens -- Jens Schweikhardt http://www.schweikhardt.net/ SIGSIG -- signature too long (core dumped)