ccache: fix initial setup failure
PATCH 1/1 ccache: fix initial setup failure
The BR2_CCACHE_INITIAL_SETUP can fail if CCACHE_DISABLE is defined in the environment, because ccache refuses to create a ccache.conf file when caching is disabled. To avoid this failure, we unset CCACHE_DISABLE prior to doing any initial cache setup, just on the call setting up the initial config. The rest of the build can proceed with CCACHE_DISABLE set, if the user wishes it so.
--- package/ccache/ccache.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
package/ccache/ccache.mk +1 -1
@@ -55,7 +55,7 @@ BR_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP)) ifneq ($(BR_CCACHE_INITIAL_SETUP),) define HOST_CCACHE_DO_INITIAL_SETUP @$(call MESSAGE,"Applying initial settings") - $(CCACHE) $(BR_CCACHE_INITIAL_SETUP) + unset CCACHE_DISABLE; $(CCACHE) $(BR_CCACHE_INITIAL_SETUP) $(CCACHE) -s endef
Signature · 1 line
2.7.4
PATCH 1/1 ccache: fix initial setup failure
Danomi, All,
On 2018-08-27 21:23 -0400, Danomi Manchego spake thusly:
Quoted 6 lines
The
BR2_CCACHE_INITIAL_SETUPcan fail ifCCACHE_DISABLEis defined in the environment, because ccache refuses to create a ccache.conf file when caching is disabled. To avoid this failure, we unsetCCACHE_DISABLEprior to doing any initial cache setup, just on the call setting up the initial config. The rest of the build can proceed withCCACHE_DISABLEset, if the user wishes it so.
Although I do undersand the explanations, I don't understand why a use would export CCACHE_DISABLE in their environment, thereby explicitly telling ccache to not cache or use the cache, and at the same time explicitly enable ccache in Buildroot and asking it to prepare a cache to use it...
That does not make sense to me.
It would be like the user would export an http_proxy environment variable with an invalid proxy, and us trying to work-around that.
Regards,
Yann E. MORIN.
Quoted 25 lines
Signed-off-by Danomi Manchego <[email protected]>--- package/ccache/ccache.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)package/ccache/ccache.mk +1
-1@@ -55,7 +55,7 @@ BR_CCACHE_INITIAL_SETUP = $(call qstrip,$(BR2_CCACHE_INITIAL_SETUP)) ifneq ($(BR_CCACHE_INITIAL_SETUP),) define HOST_CCACHE_DO_INITIAL_SETUP @$(call MESSAGE,"Applying initial settings") - $(CCACHE) $(BR_CCACHE_INITIAL_SETUP) + unset CCACHE_DISABLE; $(CCACHE) $(BR_CCACHE_INITIAL_SETUP) $(CCACHE) -s endefSignature · 6 lines
2.7.4 _______________________________________________ buildroot mailing list buildroot at busybox.net http://lists.busybox.net/mailman/listinfo/buildroot
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'