Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 19 Nov 2005 08:42:57 -0500
From:      Nicolas Blais <nb_root@videotron.ca>
To:        Jens Schweikhardt <schweikh@schweikhardt.net>
Cc:        Steve Hodgson <steve@acidy.com>, Maxim.Sobolev@portaone.com, michael johnson <buhnux@gmail.com>, freebsd-current@freebsd.org
Subject:   Re: Using ccache for build{world, 	kernel}
Message-ID:  <200511190843.03660.nb_root@videotron.ca>
In-Reply-To: <20051116175853.GA899@schweikhardt.net>
References:  <200511141702.45491.nb_root@videotron.ca> <200511151942.04277.nb_root@videotron.ca> <20051116175853.GA899@schweikhardt.net>

next in thread | previous in thread | raw e-mail | index | archive | help

[-- Attachment #1 --]
> The ccache port is not broken. Rather, the assumption that any port can
> deal with CC="foo bar" is wrong. Some ports choke because they've never
> seen a CC like that (libtool15 comes to mind), some may choke because
> their build can't deal with a space in a program name (shell word splitting
> at the wrong time or not at all is a likely culprit). Some insist on
> their own special-tailored compiler (openoffice). The build hackery out
> there in 13000 ports is unbelievably, uh, creative. To avoid all of these
> issues you have to replace all of /usr/bin/{cc,c++,gcc,g++,...} and
> /usr/local/bin/gcc-ooo and that ilk with a symlink to /usr/local/bin/ccache
> and put the real compilers in some other directory. In other words, the
> ccache installation is as transparent as can be. The various builds don't
> even know that they are using ccache when they run /usr/bin/cc and you
> don't need any CC, CXX or PATH sequence hackery. Usually this means to set
> CCACHE_PATH which collides with the needs of a "make buildworld". So, you
> really need two different strategies, one when building
> world/kernel, and one for all other purposes. That's what I do right now
> and so far I have no problems with ports and ccache.
>
> Regards,
>
> 	Jens

Okay, but is /usr/local/share/doc/ccache/ccache-howto-freebsd.txt still valid?  
Such as : 
To use ccache add the following to /etc/make.conf

.if !defined(NOCCACHE)
.if ${.CURDIR:M/usr/src*}
CC=/usr/local/libexec/ccache/cc
CXX=/usr/local/libexec/ccache/c++
.else
CC=cc
CXX=c++
.endif
.else
CC=/usr/bin/cc
CXX=/usr/bin/c++
.endif

I'm asking because I'm slightly confused (sorry) as some people tell me to not 
put the block in /etc/make.conf.  If I don't put anything, my .ccache folder 
remains empty (therefore ccache not being used). 
Whatever the real usage of ccache, it should be mentionned in that file, or 
during 'make install' as a pkg-message.

Thanks,
Nicolas.
-- 
FreeBSD 7.0-CURRENT #0: Tue Nov 15 06:21:56 EST 2005     
root@clk01a:/usr/obj/usr/src/sys/CLK01A 
PGP? (updated 16 Nov 05) : http://www.clkroot.net/security/nb_root.asc

[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.2 (FreeBSD)

iD8DBQBDfyvn4wTBlvcsbJURAl0cAKDEX7fGd6f2eD6DJl7XDSur3nVYkACfcGMO
7ndJc6+Zth6fBtuCxAgGiew=
=7H5V
-----END PGP SIGNATURE-----

Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200511190843.03660.nb_root>