Gentoo Archives: gentoo-user

From: Uwe Thiem <uwix@××××.na>
To: gentoo-user@l.g.o
Subject: Re: [gentoo-user] ccache results [was; checking for.....
Date: Sat, 03 May 2008 17:23:46
Message-Id: 200805031823.32294.uwix@iway.na
In Reply to: Re: [gentoo-user] ccache results [was; checking for..... by David Relson
1 On Saturday 03 May 2008, David Relson wrote:
2 > On Sat, 3 May 2008 14:17:39 +0100
3 >
4 > Uwe Thiem wrote:
5 > > On Saturday 03 May 2008, David Relson wrote:
6 > > > On Fri, 2 May 2008 07:10:02 -0400
7 > > > David Relson wrote:
8 > > >
9 > > > ...[snip]...
10 > > >
11 > > > > As part of identifying the capabilities and files of your
12 > > > > operating system (distro) ./configure creates a lot of small
13 > > > > programs and compiles them. I can see how caching
14 > > > > compilation info would help with this.
15 > > >
16 > > > I ran a quick test with ccache and ./configure. Using
17 > > > bogofilter's configure script (because it was available):
18 > > >
19 > > > before installing ccache:
20 > > >
21 > > > 3 runs of ./configure averaged 6.07s
22 > > >
23 > > > ... installed ccache ...
24 > > >
25 > > > next run took 6.5 sec (slower than before)
26 > > > next 3 runs averaged 4.96s (18.4% better than before)
27 > >
28 > > All your configure runs were for the same package, right?
29 >
30 > Correct.
31 >
32 > > > conclusion: ccache _does_ help ./configure
33 > >
34 > > It does not for different packages, AFAIK. And that was the
35 > > question of the OP.
36 >
37 > There _should_ be some effect as there are many operations common
38 > amongst configure scripts, for example determining the name of
39 > the header file defining malloc or determining whether to use bzero
40 > or memset, etc, etc. As with any form of caching the rate of cache
41 > hits will vary depending on load and cache size.
42 > k
43
44 Disclaimer: I haven't tried this out. It's all speculation. ;-)
45
46 There might be a way. If you don't set "ccache" as FEATURE
47 in /etc/make.conf but mv /usr/bin/ccache to /usr/local/bin/ccache.
48 Then make the following symlinks:
49 ln -s /usr/local/bin/ccache /usr/local/bin/gcc
50 ln -s /usr/local/bin/ccache /usr/local/bin/g++
51 ln -s /usr/local/bin/ccache /usr/local/bin/cc
52
53 Next step: Make sure that /usr/local/bin comes before /usr/bin in your
54 PATH.
55
56 With this setup, every identical test program generated and compiled
57 by configure may seem to be identical for ccache. As I have said,
58 haven't tried it.
59
60 Anyway, it seems to me that more and more projects switch from
61 autotools to cmake which is *much* faster than autotools.
62
63 Uwe
64
65 --
66 Ignorance killed the cat, sir, curiosity was framed!
67 --
68 gentoo-user@l.g.o mailing list