can't compile -CURRENT since 2 days ago

Steve Hodgson steve at acidy.com
Tue Nov 15 02:48:17 PST 2005


Nicolas Blais wrote:

>>Your build environment is screwed, there shouldn't be CC='/usr/bin/cc'.
>>During buildworld, /usr/obj/usr/src/tmp/usr/include is populated with
>>fresh headers, and a special (not /usr/bin/cc) compiler and friends
>>are used to pick up headers from this location and not /usr/include.
>>This CC='/usr/bin/cc' prevents this from happening, hence the breakage.
>>
>>
>>Cheers,
>>    
>>
>
>So, ccache's port recommending this:
>
>.if !defined(NOCCACHE)
>.if ${.CURDIR:M/usr/src*}
>CC=/usr/local/libexec/ccache/cc
>CXX=/usr/local/libexec/ccache/c++
>.else
>CC=cc
>CXX=c++
>.endif
>.else
>CC=/usr/bin/cc
>CXX=/usr/bin/c++
>.endif
>
>in /etc/make.conf is wrong?
>  
>
Well, if ccache was clever enough to support kernel builds then it would 
be ok. But since I've never managed to get it to work reliably I use:

.if ${.CURDIR:M/usr/src*} || ${.CURDIR:M/usr/obj*}
CC=cc
CXX=c++
.else
.if defined(NOCCACHE)
CC=/usr/bin/cc
CXX=/usr/bin/c++
.else
CC=cc
CXX=c++
.endif
.endif

Not sure if it is ccache itself or the make.conf example that is wrong.




More information about the freebsd-current mailing list