ccache support for make buildworld/make release

Ruslan Ermilov ru at FreeBSD.ORG
Sun Sep 12 11:02:30 PDT 2004


On Sun, Sep 12, 2004 at 04:03:11PM +0200, Jens Schweikhardt wrote:
> Following up myself,
> 
> On Sun, Sep 12, 2004 at 01:24:11PM +0200, Jens Schweikhardt wrote:
> # On Wed, Aug 25, 2004 at 11:33:42AM -0700, Kris Kennaway wrote:
> # ...
> # # BTW, I don't think there's anything to set up..you just set
> # # CC="ccache cc" or similar.
> 
> I've investigated further and found that the cc which is used
> after bootstrapping uses a different start for include path
> search, e.g.
> 
> /usr/bin/cc -v ...
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/include
> End of search list.
> 
> /usr/obj/share/HEAD/src/i386/usr/bin/cc -v ...
> #include "..." search starts here:
> #include <...> search starts here:
>  /usr/obj/share/HEAD/src/i386/usr/include
> End of search list.
> 
> This is why the includes are not found when ccache is forced to use
> /usr/bin/cc. Which somewhat defeats the purpose of ccache: if the
> build switches compilers, ccache only speeds up the bootstrapping
> up to that point. Unfortunately, ccache also hashes the compiler's
> modification timestamp, so each time a new cc is used in the build,
> this effectively means no more cache hits for all previous compiled
> files.
> 
> Hmm. Maybe I could hack ccache to make it ignore the modification
> timestamp... Hmmm. Room for foot shooting... Hmmm.
> 
ccache can be useful with "make all".  But with buildworld, since
the compiler is alwys rebuilt, ccache is only useful with -DNOCLEAN,
when the compiler is not upgraded.


Cheers,
-- 
Ruslan Ermilov
ru at FreeBSD.org
FreeBSD committer
-------------- 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/20040912/d974f674/attachment.bin


More information about the freebsd-current mailing list