Date: Sat, 04 Aug 2012 09:42:39 -0500 From: Bryan Drewery <bdrewery@freebsd.org> To: RW <rwmaillists@googlemail.com> Cc: ports@freebsd.org Subject: Re: [CFT] [bsd.port.mk] ports ccache build support Message-ID: <501D34DF.2070205@FreeBSD.org> In-Reply-To: <20120804141607.55249f62@gumby.homeunix.com> References: <501C7572.3020707@FreeBSD.org> <20120804141607.55249f62@gumby.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 8/4/2012 8:16 AM, RW wrote: > On Fri, 03 Aug 2012 20:05:54 -0500 > Bryan Drewery wrote: > >> Hi, >> >> ports/169579 is currently tracking this. >> >> This patch adds ccache support to ports (off by default). Other >> patches have changed $CC to use ccache, which results in having a >> space in $CC. This breaks many ports such as boost and libtool ports. >> >> This patch however utilizes the symlinks in >> /usr/local/libexec/ccache/{cc,gcc,etc...} by prefixing that directory >> into $PATH in the $MAKE_ENV. > > But if you've read the ccache documentation you probably already have > that directory in PATH anyway. Does this patch provide a significant > advantage? That requires needless customization. The purpose here is easy, safe and native support. The included ccache-howto-freebsd.txt with devel/ccache is quite long for something that is straight forward. I've seen many incorrect guides that suggest changing $CC. There's forum posts and sysutils/bsdadminscripts that do this. This leads to broken builds and needing to define which ports support ccache via $CC and which do not. > > >> The cache directory CCACHE_DIR defaults to /usr/obj/ccache >> ... >> To use ccache(1) from the command line to configure the size or view >> stats: CCACHE_DIR=/usr/obj/ccache ccache -s > > Having a default ccache directory in the makefile that's different from > the default documented in the ccache man page seems needlessly > confusing to me. The default being $HOME/.ccache makes even less sense for port building. > > And see hier(7) and section 25.7.6 of the handbook for > why /usr/obj/ccache is a poor choice. I think /usr/obj makes sense. There is /var/cache now, but /var is typically a smaller partition. Do you have a better suggestion? -- Regards, Bryan Drewery bdrewery@freenode/EFNet
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?501D34DF.2070205>