From owner-freebsd-current@FreeBSD.ORG Thu Aug 26 08:57:41 2004 Return-Path: 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 49E6016A4CF for ; Thu, 26 Aug 2004 08:57:41 +0000 (GMT) Received: from av7-1-sn2.hy.skanova.net (av7-1-sn2.hy.skanova.net [81.228.8.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id F266C43D48 for ; Thu, 26 Aug 2004 08:57:39 +0000 (GMT) (envelope-from ertr1013@student.uu.se) Received: by av7-1-sn2.hy.skanova.net (Postfix, from userid 502) id 9D7D937E43; Thu, 26 Aug 2004 10:57:38 +0200 (CEST) Received: from smtp2-1-sn2.hy.skanova.net (smtp2-1-sn2.hy.skanova.net [81.228.8.177]) by av7-1-sn2.hy.skanova.net (Postfix) with ESMTP id 8ADC537E42 for ; Thu, 26 Aug 2004 10:57:38 +0200 (CEST) Received: from falcon.midgard.homeip.net (h201n1fls24o1048.bredband.comhem.se [212.181.162.201]) by smtp2-1-sn2.hy.skanova.net (Postfix) with SMTP id 6232837E42 for ; Thu, 26 Aug 2004 10:57:38 +0200 (CEST) Received: (qmail 87376 invoked by uid 1001); 26 Aug 2004 08:57:38 -0000 Date: Thu, 26 Aug 2004 10:57:37 +0200 From: Erik Trulsson To: Ruslan Ermilov Message-ID: <20040826085737.GA87342@falcon.midgard.homeip.net> Mail-Followup-To: Ruslan Ermilov , Kris Kennaway , Maxim Maximov , Maxim Sobolev , current@freebsd.org, Roman Kurakin References: <412CBC91.3070900@portaone.com> <412CD983.2040700@cronyx.ru> <20040825183342.GA81434@xor.obsecurity.org> <412CEF62.5010600@mcsi.pp.ru> <412CFBED.6030508@portaone.com> <20040825210144.GG35529@ip.net.ua> <20040826030131.GA25905@xor.obsecurity.org> <20040826061402.GB26879@ip.net.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040826061402.GB26879@ip.net.ua> User-Agent: Mutt/1.5.6i cc: Maxim Maximov cc: Maxim Sobolev cc: Roman Kurakin cc: current@freebsd.org cc: Kris Kennaway Subject: Re: ccache support for make buildworld/make release X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 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: Thu, 26 Aug 2004 08:57:41 -0000 On Thu, Aug 26, 2004 at 09:14:02AM +0300, Ruslan Ermilov wrote: > On Wed, Aug 25, 2004 at 08:01:31PM -0700, Kris Kennaway wrote: > > On Thu, Aug 26, 2004 at 12:01:44AM +0300, Ruslan Ermilov wrote: > > > On Wed, Aug 25, 2004 at 11:51:57PM +0300, Maxim Sobolev wrote: > > > > Yeah, I've noticed that as well. Also, for some reason when I've re-run > > > > make world second time all objects built after buildtools miss the > > > > cache. Strange.... > > > > > > > Does ccache take into account that the "cc" binary may be different > > > for the same source and the command? What will happen, assuming > > > it's made to work, if you attempt to build the native i386 world, > > > and then try to "make buildworld TARGET_ARCH=alpha"? The cc > > > command will be the same; will ccache substitute the i386 code in > > > this case? Also, what happens for a native build when we upgrade > > > GCC version in the base? > > > > I believe it hashes the output of the preprocessor and uses that as > > the index into the cache. So cross-builds should probably be fine > > (assuming the right cc is used) since they'll hash differently. > > Compiler upgrades might not work reliably since you might sometimes > > get the object file from the old compiler. > > > I'm pretty sure the following code will preprocess identically on > all architectures, no? > > : void > : foo(void) > : { > : } ccache does take into account that the compiler might be different. >From the ccache(1) manpage: The basic idea is to detect when you are compiling exactly the same code a 2nd time and use the previously compiled output. You detect that it is the same code by forming a hash of: o the pre-processor output from running the compiler with -E o the command line options o the real compilers size and modification time o any stderr output generated by the compiler Note the third bulletpoint. -- Erik Trulsson ertr1013@student.uu.se