Date: Thu, 26 Aug 2004 10:57:37 +0200 From: Erik Trulsson <ertr1013@student.uu.se> To: Ruslan Ermilov <ru@freebsd.org> Cc: Kris Kennaway <kris@obsecurity.org> Subject: Re: ccache support for make buildworld/make release Message-ID: <20040826085737.GA87342@falcon.midgard.homeip.net> In-Reply-To: <20040826061402.GB26879@ip.net.ua> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
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. -- <Insert your favourite quote here.> Erik Trulsson ertr1013@student.uu.se
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040826085737.GA87342>