Created attachment 198041 [details] Patch for Mk/bsd.gecko.mk removing absolute pathnames for CC, CPP, and CXX The use of absolute pathnames for CC, CPP, and CXX, inhibits the use of ccache and further more erects new ccaches in ${WRKDIR}/.cache, rendering a central ccache like /root/.ccache or /var/cache/ccache useless. See attached patch.
This has the exact same aims as my bug 224471. Only MOZ_OPTIONS+=--with-ccache needs specified in order to use ccache, which when enabled, calls ccache directly in front of the exact compiler paths. This is done with a conditional checking whether WITH_CCACHE_BUILD is enabled in a user's make.conf (or otherwise enabled in poudriere). Hang on, I've an updated patch that fixes my muffed conditional that was in the patch before; been using this privately for quite some time now...
I've tested both patches on FreeBSD 11.2 RELEASE, poudriere 3.2.8, ports current: - removing absolute pathnames does't work, ccache not called - using --with-ccache works, cccache caches ok. Conclusion: To have ccache working within poudriere, we just need patch: .if ${WITH_CCACHE_BUILD} MOZ_OPTIONS+= --with-ccache .endif. I not tested build outside poudriere.
(In reply to Nuno Teixeira from comment #2) I failed to mention I have /usr/local/libexec/ccache prepended to PATH.
(In reply to Trond.Endrestol from comment #3) Telling configure to use ccache when requested is better than not doing anything.
*** Bug 224471 has been marked as a duplicate of this bug. ***
*** This bug has been marked as a duplicate of bug 224471 ***