On Saturday 03 May 2008, David Relson wrote: > On Sat, 3 May 2008 14:17:39 +0100 > > Uwe Thiem wrote: > > On Saturday 03 May 2008, David Relson wrote: > > > On Fri, 2 May 2008 07:10:02 -0400 > > > David Relson wrote: > > > > > > ...[snip]... > > > > > > > As part of identifying the capabilities and files of your > > > > operating system (distro) ./configure creates a lot of small > > > > programs and compiles them. I can see how caching > > > > compilation info would help with this. > > > > > > I ran a quick test with ccache and ./configure. Using > > > bogofilter's configure script (because it was available): > > > > > > before installing ccache: > > > > > > 3 runs of ./configure averaged 6.07s > > > > > > ... installed ccache ... > > > > > > next run took 6.5 sec (slower than before) > > > next 3 runs averaged 4.96s (18.4% better than before) > > > > All your configure runs were for the same package, right? > > Correct. > > > > conclusion: ccache _does_ help ./configure > > > > It does not for different packages, AFAIK. And that was the > > question of the OP. > > There _should_ be some effect as there are many operations common > amongst configure scripts, for example determining the name of > the header file defining malloc or determining whether to use bzero > or memset, etc, etc. As with any form of caching the rate of cache > hits will vary depending on load and cache size. > k
Disclaimer: I haven't tried this out. It's all speculation. ;-) There might be a way. If you don't set "ccache" as FEATURE in /etc/make.conf but mv /usr/bin/ccache to /usr/local/bin/ccache. Then make the following symlinks: ln -s /usr/local/bin/ccache /usr/local/bin/gcc ln -s /usr/local/bin/ccache /usr/local/bin/g++ ln -s /usr/local/bin/ccache /usr/local/bin/cc Next step: Make sure that /usr/local/bin comes before /usr/bin in your PATH. With this setup, every identical test program generated and compiled by configure may seem to be identical for ccache. As I have said, haven't tried it. Anyway, it seems to me that more and more projects switch from autotools to cmake which is *much* faster than autotools. Uwe -- Ignorance killed the cat, sir, curiosity was framed! -- [email protected] mailing list

