Working ccache configuration for buildworld on amd64?

Maxim Khitrov mkhitrov at gmail.com
Thu Aug 14 20:04:54 UTC 2008


This is an old problem, but so far I haven't been able to find a
solution. When ccache is used to build world on amd64, the process
fails when /usr/src/lib/csu/i386-elf/crt1.c is compiled. If
WITHOUT_LIB32 is added to src.conf, this problem does not happen.
Likewise, building without ccache works fine.

Has anyone out there been able to find a ccache configuration that
would work in this situation? I tried disabling ccache for some of the
directories under /usr/src and /usr/obj, but it only caused problems
in other stages of the build process.

Here are the default ccache settings from make.conf:

.if exists(/usr/local/libexec/ccache) && !defined(NOCCACHE) && \
    (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
CC=  /usr/local/libexec/ccache/world-cc
CXX= /usr/local/libexec/ccache/world-c++
.endif

And here is what I tried using to isolate the problem, albeit with no success:

.if exists(/usr/local/libexec/ccache) && !defined(NOCCACHE) && \
    (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*)) && \
    empty(.CURDIR:M/usr/src/lib/csu*) && \
    empty(.CURDIR:M/usr/obj/usr/src/lib/csu*) && \
    empty(.CURDIR:M/usr/obj/lib32/usr/src/lib/csu*)
CC=  /usr/local/libexec/ccache/world-cc
CXX= /usr/local/libexec/ccache/world-c++
.endif

Please let me know if you have a working solution.

- Max


More information about the freebsd-questions mailing list