From owner-freebsd-current@FreeBSD.ORG Tue Nov 15 22:11:07 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 1515A16A41F for ; Tue, 15 Nov 2005 22:11:07 +0000 (GMT) (envelope-from steve@acidy.com) Received: from acidy.com (iade006wl01.blackmesh.com [216.66.28.50]) by mx1.FreeBSD.org (Postfix) with SMTP id 7108943D45 for ; Tue, 15 Nov 2005 22:11:06 +0000 (GMT) (envelope-from steve@acidy.com) Received: (qmail 13660 invoked by uid 512); 15 Nov 2005 22:11:05 -0000 Received: from steve@acidy.com by terrence by uid 510 with qmail-scanner-1.21st (clamdscan: 0.70rc. spamassassin: 2.63. Clear:RC:1(212.44.26.151):. Processed in 0.18392 secs); 15 Nov 2005 22:11:05 -0000 Received: from no-reverse.dialnet.com (HELO shark.scudamores.com) (212.44.26.151) by acidy.com with SMTP; 15 Nov 2005 22:11:05 -0000 Received: from congo.princess.dyns.cx ([192.168.1.10]) by shark.scudamores.com with Microsoft SMTPSVC(5.0.2195.6713); Tue, 15 Nov 2005 22:11:04 +0000 Received: from [127.0.0.1] (localhost [127.0.0.1]) by congo.princess.dyns.cx (Postfix) with ESMTP id DC6355D02; Tue, 15 Nov 2005 22:11:01 +0000 (GMT) Message-ID: <437A5CF5.4020203@acidy.com> Date: Tue, 15 Nov 2005 22:11:01 +0000 From: Steve Hodgson User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051108) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Nicolas Blais References: <200511141702.45491.nb_root@videotron.ca> <20051115183647.GA1783@schweikhardt.net> <20051115211418.GE1783@schweikhardt.net> <200511151657.44716.nb_root@videotron.ca> In-Reply-To: <200511151657.44716.nb_root@videotron.ca> X-Enigmail-Version: 0.93.0.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-OriginalArrivalTime: 15 Nov 2005 22:11:04.0870 (UTC) FILETIME=[78AB0C60:01C5EA31] Cc: freebsd-current@freebsd.org, Jens Schweikhardt 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:11:07 -0000 Nicolas Blais wrote: >On November 15, 2005 04:14 pm, Jens Schweikhardt wrote: > > >>Folks, >> >># Put this in /usr/ports/devel/ccache/files/patch-nohash-size-mtime and >># reinstall the port. Then export CCACHE_NOHASH_SIZE_MTIME=y during your >># makes for buildworld and buildkernel. This melts my buildworld time >># from 2700s (real@~100%CPU) to under 1000s and buildkernel from 800s >># to 250s, so you gain about a factor 3 for ab-initio builds. Sweet! >># >># >># --- ccache.c.orig Mon Oct 31 17:38:21 2005 >># +++ ccache.c Mon Oct 31 17:52:31 2005 >># @@ -331,8 +331,10 @@ >># hash_string(str_basename(args->argv[0])); >># } >># >># - hash_int(st.st_size); >># - hash_int(st.st_mtime); >># + if (!getenv("CCACHE_NOHASH_SIZE_MTIME")) { >># + hash_int(st.st_size); >># + hash_int(st.st_mtime); >># + } >>[Rest of patch snipped ...] >> >>I just asked the devel/ccache maintainer to commit this patch and he >>promptly did (Thanks Michael Johnson, aka ahze!). So you only need this >>unless your ports tree is current as of now. >> >>Regards, >> >> Jens >> >> > >Thanks, very helpful! > > > So would the following form a better set of instructions for the port (given the above patch is merged)? 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*} 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) Steve