I've enabled ccache for ports by adding the following to my /etc/make.conf file: > # Use ccache to reduce compilation times > WITH_CCACHE_BUILD=yes > CCACHE_DIR=/space/ccache Recently, I decided to switch to clang35 for the sake of seeing how well it would work, so my /etc/make.conf file became this: > # Use ccache to reduce compilation times > WITH_CCACHE_BUILD=yes > CCACHE_DIR=/space/ccache > # Use ports clang35 as the default compiler > CC=/usr/local/bin/clang35 > CXX=/usr/local/bin/clang++35 > CPP=/usr/local/bin/clang-cpp35 I noticed that after adding the CC.. lines to use clang35, ccache stopped getting used - none of the stats were incrementing. Everything keeps compiling all the same, but I'd be great if I could configure both and have it work as expected.
The WITH_CCACHE_BUILD prepends PATH to /usr/local/libexec/ccache/ to use ccache. This allows using the symlinks in there to use the desired compiler. We don't modify CC, such as CC="/usr/local/bin/ccache /usr/local/bin/clang35", because many ports refuse to work with the embedded space. You can make this work by enabling the CLANGLINK option in devel/ccache and using: CC= clang35 CXX=clang++35 CPP=clang-cpp35 CCACHE_PATH= /usr/local/bin .export CCACHE_PATH # Export only works with FreeBSD 10+
We could potentially auto handle this in bsd.ccache.mk.
(In reply to Bryan Drewery from comment #2) Is this still an issue? If so let's create a dependent issue. If not, close OBE or relevent resolution