ccache selects wrong compiler (calls clang, not gcc46)

Beeblebrox zaphod at
Mon Jan 7 19:37:45 UTC 2013

I have a clang-only world (no gcc42) and want to use gcc46 for port building.
I have ccache and distcc installed. In /etc/make.conf I have:


This used to work correctly but does not anymore. Compiler keeps insisting
on using clang and during portbuild I get below output. Note that I have
distcc disabled at the moment, but distcc gets called anyway.

distcc[11685] (dcc_build_somewhere) Warning: failed to distribute, running
locally instead
/usr/local/bin/ccache /usr/local/bin/distcc g++46 -c -pipe -g
-D__STDC_FORMAT_MACROS -Wno-unused-parameter -O2 -pipe -march=k8
-fno-strict-aliasing -fPIC -Wall -W  ... etc

I have traced the problem to the ccache pre-compiler because in
/etc/make.conf if I replace above with:
distcc and ccache still get called (but not clang) unless I also enable:

View this message in context:
Sent from the freebsd-ports mailing list archive at

More information about the freebsd-ports mailing list