Skip to contentSkip to conversation

svn commit: trunk/buildroot/toolchain/ccache

Buildroot wberrier at uclibc.org 3 participants 3 messages Oct 6, 2008

lore
Share & tools
lore
#0 lore raw

Author: wberrier
Date: 2008-10-06 12:14:41 -0700 (Mon, 06 Oct 2008) New Revision: 23604

Log:
ccache:
-Allow user to specify custom ccache location.

This allows you to build a toolchain and put it on
an nfs share so other people can use the toolchain without errors about the ccache dir missing.

Modified:
trunk/buildroot/toolchain/ccache/Config.in
trunk/buildroot/toolchain/ccache/ccache.mk

Changeset:
Modified: trunk/buildroot/toolchain/ccache/Config.in
===================================================================

buildroot/toolchain/ccache/Config.in +10 -0
@@ -7,3 +7,13 @@
 	help
 	    Enable ccache support?
 
+config BR2_CCACHE_DIR
+	string "ccache dir location?"
+	depends on BR2_CCACHE
+	default "$(TOOL_BUILD_DIR)/ccache-$(CCACHE_VER)/cache"
+	help
+	    Where ccache should store cached files.
+
+comment "ccache dir location?       - disabled (requires ccache support)"
+	depends on !BR2_CCACHE
+

Modified: trunk/buildroot/toolchain/ccache/ccache.mk
===================================================================

buildroot/toolchain/ccache/ccache.mk +3 -2
@@ -24,8 +24,9 @@
 	# Should probably patch things to use a relative path.
 	$(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin-ccache\",g" \
 		$(CCACHE_DIR1)/execute.c
-	# WARNING - this will break if the toolchain build dir is deleted.
-	$(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \
+	# WARNING - this will break if the toolchain build dir is deleted
+	#	when using the default cache dir location.
+	$(SED) "s,getenv(\"CCACHE_DIR\"),\"$(BR2_CCACHE_DIR)\",g" \
 		$(CCACHE_DIR1)/ccache.c
 	mkdir -p $(CCACHE_DIR1)/cache
 	touch $@
#1 lore raw
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"wberrier" == wberrier <[email protected]> writes:

wberrier> Author: wberrier
wberrier> Date: 2008-10-06 12:14:41 -0700 (Mon, 06 Oct 2008) wberrier> New Revision: 23604

wberrier> Log:
wberrier> ccache:
wberrier> -Allow user to specify custom ccache location.

...

wberrier> +config BR2_CCACHE_DIR
wberrier> + string "ccache dir location?"
wberrier> + depends on BR2_CCACHE
wberrier> + default "$(TOOL_BUILD_DIR)/ccache-$(CCACHE_VER)/cache"
wberrier> + help
wberrier> + Where ccache should store cached files.
wberrier> +
wberrier> +comment "ccache dir location? - disabled (requires ccache support)"
wberrier> + depends on !BR2_CCACHE
wberrier> +

Do we really need that comment line? Would anyone go looking for something like this if they weren't using ccache in the first place?

wberrier> Modified: trunk/buildroot/toolchain/ccache/ccache.mk wberrier> ===================================================================
wberrier> --- trunk/buildroot/toolchain/ccache/ccache.mk 2008-10-06 19:09:14 UTC (rev 23603)
wberrier> +++ trunk/buildroot/toolchain/ccache/ccache.mk 2008-10-06 19:14:41 UTC (rev 23604)
wberrier> @@ -24,8 +24,9 @@

 wberrier>  	# Should probably patch things to use a relative path.
 wberrier>  	$(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin-ccache\",g" \
 wberrier>  		$(CCACHE_DIR1)/execute.c

wberrier> - # WARNING - this will break if the toolchain build dir is deleted.
wberrier> - $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \
wberrier> + # WARNING - this will break if the toolchain build dir is deleted
wberrier> + # when using the default cache dir location.
wberrier> + $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(BR2_CCACHE_DIR)\",g" \

Why do we even do this in the first place? What's wrong with the user simply setting CCACHE_DIR like they expect to do for ccache?

Signature · 1 line
Bye, Peter Korsgaard
#2 lore raw
Quoted 26 lines · Peter Korsgaard
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"wberrier" == wberrier <[email protected]> writes:

wberrier> Author: wberrier
wberrier> Date: 2008-10-06 12:14:41 -0700 (Mon, 06 Oct 2008) wberrier> New Revision: 23604

wberrier> Log:
wberrier> ccache:
wberrier> -Allow user to specify custom ccache location.

...

wberrier> +config BR2_CCACHE_DIR

 wberrier> +    string "ccache dir location?"
 wberrier> +    depends on BR2_CCACHE
 wberrier> +    default "$(TOOL_BUILD_DIR)/ccache-$(CCACHE_VER)/cache"
 wberrier> +    help

wberrier> + Where ccache should store cached files.
wberrier> +
wberrier> +comment "ccache dir location? - disabled (requires ccache support)"
wberrier> + depends on !BR2_CCACHE
wberrier> +

Quoted 2 lines

Do we really need that comment line? Would anyone go looking for something like this if they weren't using ccache in the first place?

Good point. Fixed.

Quoted 17 lines

wberrier> Modified: trunk/buildroot/toolchain/ccache/ccache.mk wberrier> ===================================================================
wberrier> --- trunk/buildroot/toolchain/ccache/ccache.mk 2008-10-06 19:09:14 UTC (rev 23603)
wberrier> +++ trunk/buildroot/toolchain/ccache/ccache.mk 2008-10-06 19:14:41 UTC (rev 23604)
wberrier> @@ -24,8 +24,9 @@
wberrier> # Should probably patch things to use a relative path.
wberrier> $(SED) "s,getenv(\"CCACHE_PATH\"),\"$(STAGING_DIR)/usr/bin-ccache\",g" \
wberrier> $(CCACHE_DIR1)/execute.c

 wberrier> -    # WARNING - this will break if the toolchain build dir is deleted.
 wberrier> -    $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(CCACHE_DIR1)/cache\",g" \
 wberrier> +    # WARNING - this will break if the toolchain build dir is deleted
 wberrier> +    #       when using the default cache dir location.
 wberrier> +    $(SED) "s,getenv(\"CCACHE_DIR\"),\"$(BR2_CCACHE_DIR)\",g" \
Quoted 2 lines

Why do we even do this in the first place? What's wrong with the user simply setting CCACHE_DIR like they expect to do for ccache?

I'm not sure why it was done originally, but the intent was to make it configurable without ruffling too many feathers.

Wade