[CFT] [bsd.port.mk] ports ccache build support
Bryan Drewery
bdrewery at freebsd.org
Mon Aug 6 03:19:18 UTC 2012
On 8/4/2012 7:38 PM, Eitan Adler wrote:
> On 4 August 2012 15:21, RW <rwmaillists at googlemail.com> wrote:
>> On Sat, 04 Aug 2012 09:42:39 -0500
>> Bryan Drewery wrote:
>
>>>> 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.
>
> +1 for /var/cache
>
>> And since large root file-systems seem to be increasingly
>> popular, /root/.ccache may seem reasonable, and people may run cache -M
>> on that.
>
> remember that its possible to build as a non-root user, but install as
> root, or similar. Using $HOME for any aspect of the build isn't a
> good idea.
>
>
I can see both arguments here.
non-root building suggests $HOME/.ccache. This has the benefit of having
ccache(1) "just work" when configuring. A downside of possibly
duplicating the cache for some users.
pkgng is storing cache files in /var/cache/pkg. This is not listed in
hier(7) yet, but probably should be added. Given that, /var/cache/ccache
makes sense as well. I still am concerned that adding a default 1gb
sized cache into /var is not a good idea. Another downside is having to
define CCACHE_DIR to run ccache(1)
I actually had used /var/cache in my initial patch, but changed to
/usr/obj since /var can be so small. On my own systems I have a mess of
symlinks to fix my own indecision on the matter. /root/.ccache ->
/var/cache/ccache -> /usr/ccache
I'm starting to lean towards sticking to the default of $HOME/.ccache as
well as it may be more "safe" and less confusing to use with ccache(1).
The user can always override.
--
Regards,
Bryan Drewery
bdrewery at freenode/EFNet
More information about the freebsd-ports
mailing list