Date: Tue, 27 Jan 2015 08:32:15 -0700 (MST) From: Warren Block <wblock@wonkity.com> To: Scott Bennett <bennett@sdf.org> Cc: freebsd-questions@freebsd.org Subject: Re: buildworld, buildkernel, and devel/cache Message-ID: <alpine.BSF.2.11.1501270817370.43203@wonkity.com> In-Reply-To: <201501271240.t0RCe9GA006605@sdf.org> References: <201501261245.t0QCjUMD009768@sdf.org> <alpine.BSF.2.11.1501260857450.4046@wonkity.com> <201501261843.t0QIhX78006200@sdf.org> <alpine.BSF.2.11.1501261625370.13608@wonkity.com> <201501271240.t0RCe9GA006605@sdf.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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. :)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?alpine.BSF.2.11.1501270817370.43203>