Using ccache for build{world,
kernel} (was: can't compile -CURRENT since 2 days ago)
Nicolas Blais
nb_root at videotron.ca
Tue Nov 15 14:08:03 PST 2005
On November 15, 2005 04:57 pm, Nicolas Blais wrote:
> On November 15, 2005 04:14 pm, Jens Schweikhardt wrote:
> > Folks,
> >
> > # Put this in /usr/ports/devel/ccache/files/patch-nohash-size-mtime and
> > # reinstall the port. Then export CCACHE_NOHASH_SIZE_MTIME=y during your
> > # makes for buildworld and buildkernel. This melts my buildworld time
> > # from 2700s (real@~100%CPU) to under 1000s and buildkernel from 800s
> > # to 250s, so you gain about a factor 3 for ab-initio builds. Sweet!
> > #
> > #
> > # --- ccache.c.orig Mon Oct 31 17:38:21 2005
> > # +++ ccache.c Mon Oct 31 17:52:31 2005
> > # @@ -331,8 +331,10 @@
> > # hash_string(str_basename(args->argv[0]));
> > # }
> > #
> > # - hash_int(st.st_size);
> > # - hash_int(st.st_mtime);
> > # + if (!getenv("CCACHE_NOHASH_SIZE_MTIME")) {
> > # + hash_int(st.st_size);
> > # + hash_int(st.st_mtime);
> > # + }
> > [Rest of patch snipped ...]
> >
> > I just asked the devel/ccache maintainer to commit this patch and he
> > promptly did (Thanks Michael Johnson, aka ahze!). So you only need this
> > unless your ports tree is current as of now.
> >
> > Regards,
> >
> > Jens
>
> Thanks, very helpful!
Actually, I've upgraded ccache to _2 and it doesn't say anymore what to put in
make.conf. Is it still :
.if ${.CURDIR:M/usr/src*} || ${.CURDIR:M/usr/obj*}
CC=cc
CXX=c++
.else
.if defined(NOCCACHE)
CC=/usr/bin/cc
CXX=/usr/bin/c++
.else
CC=cc
CXX=c++
.endif
.endif
or is it :
#.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
and do I still have to setenv CCACHE_NOHASH_SIZE_MTIME yes for a
buildworld/kernel?
Thanks,
Nicolas.
--
FreeBSD 7.0-CURRENT #0: Tue Nov 15 06:21:56 EST 2005
root at clk01a:/usr/obj/usr/src/sys/CLK01A
PGP? : http://www.clkroot.net/security/nb_root.asc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-current/attachments/20051115/aa66f1fa/attachment.bin
More information about the freebsd-current
mailing list