/usr/local/share/doc/ccache/ccache-howto-freebsd.txt has the following information: > To use ccache for ports, just add WITH_CCACHE_BUILD=yes to > /etc/make.conf. The rest of this guide is for building > /usr/src and other checkouts. > > To use ccache for base (11.0+) just add WITH_CCACHE_BUILD=yes > to /etc/src.conf. Refer to src.conf(5) for more information. It sounds like /etc/make.conf is for ports and /etc/src.conf is for things like world and kernel whereas it is not entirely true as ports do pull /etc/src.conf, don't they? The only reference to this behavior I could find was removed in this revision[1]. There's also this comment[2], which points to an email[3] saying that ports use /etc/src.conf as well. Should we update it? [1]: https://reviews.freebsd.org/D15238 [2]: https://reviews.freebsd.org/D15177#322986 [3]: https://lists.freebsd.org/pipermail/freebsd-current/2018-May/069300.html
(In reply to Mateusz Piotrowski from comment #0) > /usr/local/share/doc/ccache/ccache-howto-freebsd.txt has the following > information: > > > To use ccache for ports, just add WITH_CCACHE_BUILD=yes to > > /etc/make.conf. The rest of this guide is for building > > /usr/src and other checkouts. > > > > To use ccache for base (11.0+) just add WITH_CCACHE_BUILD=yes > > to /etc/src.conf. Refer to src.conf(5) for more information. > > It sounds like /etc/make.conf is for ports and /etc/src.conf is for things > like world and kernel whereas it is not entirely true as ports do pull > /etc/src.conf, don't they? > > The only reference to this behavior I could find was removed in this > revision[1]. There's also this comment[2], which points to an email[3] > saying that ports use /etc/src.conf as well. > > Should we update it? > > [1]: https://reviews.freebsd.org/D15238 > [2]: https://reviews.freebsd.org/D15177#322986 > [3]: https://lists.freebsd.org/pipermail/freebsd-current/2018-May/069300.html Ports should NOT be pulling in src.conf. If it is that's a bug that needs to be fixed, not documented as a feature.
I am using FreeBSD 12.0-STABLE r348603 and I also disagree with those lines, but in a different way. It seems to me that the situation is as following: - if WITH_CCACHE_BUILD=yes is in make.conf, ccache will be used both for ports and for src, while the how-to says it would be used only for ports; it can be checked with make -V CC into /usr/src that will report ccache is used (the same command in /usr/ports will never report ccache is used, but it is, I tested); - if WITH_CCACHE_BUILD=yes is in make.conf and WITHOUT_CCACHE_BUILD=no is in src.conf, then ccache will be used only for ports; again, this can be tested for src with make -V CC; - if WITH_CCACHE_BUILD=yes is in src.conf but not in make.conf I guess ccache would be used only for src, but I have not tested. I add that I have not found any documentation about WITHOUT_CCACHE_BUILD anywhere, not even in man src.conf: I just luckily guess its existence.