Skip to contentSkip to conversation

gcc: remove the --with-pkgversion option from the ccache hash

PATCH New Arnout Vandecappelle (Essensium/Mind) 2 participants 2 messages Oct 4, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc: remove the --with-pkgversion option from the ccache hash

One of the gcc configure options that we hash for ccache is --with-pkgversion which is set to something like Buildroot 2015.11-git-00426-ge7e7e4f - i.e., it will change with every buildroot commit. That's obviously not wanted, so substitute this away.

Also add a \n to the printf so the output is a bit more readable.

---
 package/gcc/gcc.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/gcc/gcc.mk +2 -1
index 420c4e9..e1d4bcf 100644
@@ -259,7 +259,8 @@ endif
 # _CONF_OPTS contains some references to the absolute path of $(HOST_DIR),
 # so substitute those away.
 HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_HASH=\"`\
-	printf '%s' $(subst $(HOST_DIR), at HOST_DIR@,$($(PKG)_CONF_OPTS)) \
+	printf '%s\n' $(subst $(HOST_DIR), at HOST_DIR@,\
+		$(subst --with-pkgversion="Buildroot $(BR2_VERSION_FULL)",,$($(PKG)_CONF_OPTS))) \
 		| sha256sum - $(HOST_GCC_COMMON_CCACHE_HASH_FILES) \
 		| cut -c -64 | tr -d '\n'`\"
 endif # BR2_CCACHE
Signature · 1 line
2.5.3
#1 lore raw

PATCH 1/1 gcc: remove the --with-pkgversion option from the ccache hash

Quoted 19 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Arnout" == Arnout Vandecappelle (Essensium/Mind) <[email protected]> writes:

One of the gcc configure options that we hash for ccache is --with-pkgversion which is set to something like Buildroot 2015.11-git-00426-ge7e7e4f - i.e., it will change with every buildroot commit. That's obviously not wanted, so substitute this away.

Also add a \n to the printf so the output is a bit more readable.

---
 package/gcc/gcc.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
package/gcc/gcc.mk +0 -0
index 420c4e9..e1d4bcf 100644

package/gcc/gcc.mk endif · line 263

Quoted 6 lines
package/gcc/gcc.mk +2 -1
@@ -259,7 +259,8 @@ endif
 # _CONF_OPTS contains some references to the absolute path of $(HOST_DIR),
 # so substitute those away.
 HOST_GCC_COMMON_TOOLCHAIN_WRAPPER_ARGS += -DBR_CCACHE_HASH=\"`\
-	printf '%s' $(subst $(HOST_DIR), at HOST_DIR@,$($(PKG)_CONF_OPTS)) \
+	printf '%s\n' $(subst $(HOST_DIR), at HOST_DIR@,\
+		$(subst --with-pkgversion="Buildroot $(BR2_VERSION_FULL)",,$($(PKG)_CONF_OPTS))) \

This is all quite tricky, so I've updated the documentation above to explain it and committed, thanks!

Signature · 1 line
Bye, Peter Korsgaard