Skip to contentSkip to conversation

gcc: sort the patches before they are hashed

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

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 gcc: sort the patches before they are hashed

$(wildcard ...) in make doesn't sort the files, so the order of the hashed files is not predictable. Therefore, the ccache hash could change from one build to another. We don't want that, so sort the files explicitly.

---
 package/gcc/gcc.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
package/gcc/gcc.mk +2 -2
index 9025cdf..4def65c 100644
@@ -243,10 +243,10 @@ HOST_GCC_COMMON_CCACHE_HASH_FILES += $(DL_DIR)/$(GCC_SOURCE)
 # Cfr. PATCH_BASE_DIRS in .stamp_patched, but we catch both versioned and
 # unversioned patches unconditionally
 HOST_GCC_COMMON_CCACHE_HASH_FILES += \
-	$(wildcard \
+	$(sort $(wildcard \
 		package/gcc/$(GCC_VERSION)/*.patch \
 		$(addsuffix $((PKG)_RAWNAME)/$(GCC_VERSION)/*.patch,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))) \
-		$(addsuffix $((PKG)_RAWNAME)/*.patch,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR))))
+		$(addsuffix $((PKG)_RAWNAME)/*.patch,$(call qstrip,$(BR2_GLOBAL_PATCH_DIR)))))
 ifeq ($(BR2_xtensa),y)
 HOST_GCC_COMMON_CCACHE_HASH_FILES += $(HOST_GCC_XTENSA_OVERLAY_TAR)
 endif
Signature · 1 line
2.5.3
#1 lore raw

PATCH 1/1 gcc: sort the patches before they are hashed

Quoted 8 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

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

$(wildcard ...) in make doesn't sort the files, so the order of the hashed files is not predictable. Therefore, the ccache hash could change from one build to another. We don't want that, so sort the files explicitly.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard