amd64/175710: ccache selects wrong compiler (calls clang, not gcc46)

Z Beeblebrox zaphod at
Wed Jan 30 19:40:02 UTC 2013

>Number:         175710
>Category:       amd64
>Synopsis:       ccache selects wrong compiler (calls clang, not gcc46)
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-amd64
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Jan 30 19:40:01 UTC 2013
>Originator:     Z Beeblebrox
>Release:        10-current
10.0-CURRENT #0 r245910 amd64
System should be using lang/gcc (gcc46) for ports building. ccache is enabled in /etc/make.conf. However, when I try to build a port, ccahce uses clang (I can tell by the output) and not gcc46. The only way to ensure that gcc46 is used as compiler is to disable in /etc/make.conf this:
And enable this:
CC=gcc46  \  CXX=g++46

I could not solve this on my own, so I filed a bug report on the ccache bugzilla. The maintainer has advised that he does not know FreeBSD that well and has deferred the issue back to FreeBSD. PR and full problem description from link below. Maintainer states:
"I'm fairly certain that the problem you are seeing has nothing to do with ccache per se but rather with how FreeBSD uses ccache".
With a pure clang built world, if you try to use gcc46 (lang/gcc) with ccache enabled to build ports, ccache does not use gcc46 but instead calls clang.  My theory is that; under clang built worlds ccache does not process the compiler call correctly.  I had a "pure clang" world under branch 9-stable. After not being able to solve this problem I switched to branch 10-current and problem persits.


More information about the freebsd-amd64 mailing list