buildworld, buildkernel, and devel/cache
    Warren Block 
    wblock at wonkity.com
       
    Tue Jan 27 15:32:18 UTC 2015
    
    
  
On Tue, 27 Jan 2015, Scott Bennett wrote:
>> I might have missed something, so let's back up.  Shell variables need
>> to be set, and entries in make.conf need to be added.  Both are needed.
>
>     Yes.  I guess I'm missing your point.  I followed the instructions in
> /usr/local/share/doc/ccache/ccache-howto-freebsd.txt, which turned out to
> cause errors on the three lines in question from those instructions.  I then
> followed your suggestion to move them, and that was ineffective in .profile
> and caused errors in .cshrc.extensions.  So I don't see how those particular
> shell variables are to be set.
>     The only other entry for /etc/make.conf is the entry that, by itself,
> is sufficient to build ports using ccache, and that, as I noted originally,
> was working just fine.  With CCACHE_DIR set in .profile and set as an
> environment variable in .cshrc.extensions, ports even get built okay with
> ccache cacheing its data in the correct file system.  (Yay!)
>     But if there are other /etc/make.conf entries needed (but undocumented?)
> or other shell/environment variables needed (also undocumented?) to get
> buildworld and buildkernel to use ccache, the please clarify.
I just reinstalled devel/ccache to test this.  The options to create 
links to clang and llvm were turned on in the port.  My old settings in 
/root/.cshrc were uncommented:
         setenv PATH /usr/local/libexec/ccache:$PATH
         setenv CCACHE_PATH /usr/bin:/usr/local/bin
         setenv CCACHE_DIR /usr/.ccache
         setenv CCACHE_COMPRESS yes
The last two are additions.  (I found that compression helped fit more 
files in the same space without measurably slowing down the build.)
In /etc/make.conf, I added this:
   .if (!empty(.CURDIR:M/usr/src*) || !empty(.CURDIR:M/usr/obj*))
   .if !defined(NOCCACHE) && exists(/usr/local/libexec/ccache/world/cc)
   CC:=${CC:C,^cc,/usr/local/libexec/ccache/world/cc,1}
   CXX:=${CXX:C,^c\+\+,/usr/local/libexec/ccache/world/c++,1}
   .endif
   .endif
This is on 10.1-STABLE.  make(1) changed a while back, so very old 
versions of FreeBSD might have errors with those.
I logged back in as root and started a buildworld, and see this:
   /usr/local/libexec/ccache/world/cc -m32 ...
>     And thanks, Walter, for your attention to this.
You're welcome, Steve. :)
    
    
More information about the freebsd-questions
mailing list