Gentoo Archives: gentoo-dev

From: Felipe Ghellar <fghellar@×××××.de>
To: gentoo-dev@g.o
Subject: [gentoo-dev] ccache
Date: Thu, 20 Jun 2002 01:13:12
Message-Id: 20020620061308.83269.qmail@web20001.mail.yahoo.com
1 I'm trying to use ccache to speed up (re)compile time, but I can't get it to work with ebuild.
2
3 I set up symlinks for gcc, cc, c++ and g++ under /sbin, all pointing to /usr/bin/ccache. The
4 actual compilers are all under /usr/bin too. I put /sbin before /usr/bin in my PATH variable, so a
5 call to gcc gets /sbin/gcc, which is a symlink to /usr/bin/ccache, which in turn calls
6 /usr/bin/gcc automatically.
7
8 For test purposes, I'm using the ebuild file bzip2-1.0.1-r4.ebuild.
9
10 Running
11 # ccache -s
12 # ebuild /usr/portage/sys-apps/bzip2/bzip2-1.0.1-r4.ebuild clean
13 # ebuild /usr/portage/sys-apps/bzip2/bzip2-1.0.1-r4.ebuild compile
14 # ccache -s
15 I notice that ccache is not used.
16
17 But running
18 # ccache -s
19 # ebuild /usr/portage/sys-apps/bzip2/bzip2-1.0.1-r4.ebuild clean
20 # ebuild /usr/portage/sys-apps/bzip2/bzip2-1.0.1-r4.ebuild unpack
21 # cd /var/tmp/portage/bzip2-1.0.1-r4/work/bzip2-1.0.1
22 # make clean
23 # make all
24 # ccache -s
25 I notice that ccache _is_ used. Even if I use /usr/lib/portage/bin/emake instead of make.
26
27 I also noticed that there is an "export PATH=..." command in /usr/lib/portage/bin/ebuild.sh, but
28 even there /sbin is before /usr/bin. Just to make sure, I appended the command "which gcc" to the
29 end of the src_compile() function in bzip2-1.0.1-r4.ebuild.
30
31 Now, running
32 # ccache -s
33 # ebuild /usr/portage/sys-apps/bzip2/bzip2-1.0.1-r4.ebuild clean
34 # ebuild /usr/portage/sys-apps/bzip2/bzip2-1.0.1-r4.ebuild compile
35 # ccache -s
36 again, I see that the output of the "which gcc" I added is indeed "/sbin/gcc", but still ccache is
37 not used.
38
39 I don't know what to do, any more... I'd appreciate any input on this.
40
41 Felipe Ghellar
42
43 --
44
45
46
47
48 __________________________________________________________________
49
50 Gesendet von Yahoo! Mail - http://mail.yahoo.de
51 Yahoo! präsentiert als offizieller Sponsor das Fußball-Highlight des
52 Jahres: - http://www.FIFAworldcup.com