]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Makefile: sort all wildcard file list expansions 2895/head
authorAlexander Kanavin <alex.kanavin@gmail.com>
Wed, 23 Dec 2020 18:14:32 +0000 (19:14 +0100)
committerAlexander Kanavin <alex@linutronix.de>
Thu, 2 Dec 2021 11:04:11 +0000 (12:04 +0100)
Otherwise the order is non-deterministic and breaks
reproducible builds.

programs/Makefile
tests/Makefile
tests/fuzz/Makefile

index fa557e6f90f3418db7f12d8a5b40f650f1872cc9..669a84120197301ee223cc108ea3ab331512093a 100644 (file)
@@ -41,7 +41,7 @@ ZSTDLIB_LOCAL_SRC = $(notdir $(ZSTDLIB_FULL_SRC))
 ZSTDLIB_LOCAL_OBJ0 := $(ZSTDLIB_LOCAL_SRC:.c=.o)
 ZSTDLIB_LOCAL_OBJ := $(ZSTDLIB_LOCAL_OBJ0:.S=.o)
 
-ZSTD_CLI_SRC := $(wildcard *.c)
+ZSTD_CLI_SRC := $(sort $(wildcard *.c))
 ZSTD_CLI_OBJ := $(ZSTD_CLI_SRC:.c=.o)
 
 ZSTD_ALL_SRC = $(ZSTDLIB_LOCAL_SRC) $(ZSTD_CLI_SRC)
index bd45451a5c8cfaae4f7a3af70f7f6924c5635c3a..efcbe9761e99a0199859727cdd46172a1f200420 100644 (file)
@@ -45,7 +45,7 @@ ZSTDDECOMP_FILES := $(sort $(ZSTD_DECOMPRESS_FILES))
 ZSTD_FILES  := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
 ZDICT_FILES := $(sort $(ZSTD_DICTBUILDER_FILES))
 
-ZSTD_F1 := $(wildcard $(ZSTD_FILES))
+ZSTD_F1 := $(sort $(wildcard $(ZSTD_FILES)))
 ZSTD_OBJ1 := $(subst $(ZSTDDIR)/common/,zstdm_,$(ZSTD_F1))
 ZSTD_OBJ2 := $(subst $(ZSTDDIR)/compress/,zstdc_,$(ZSTD_OBJ1))
 ZSTD_OBJ3 := $(subst $(ZSTDDIR)/decompress/,zstdd_,$(ZSTD_OBJ2))
@@ -206,7 +206,7 @@ bigdict: $(ZSTDMT_OBJECTS) $(PRGDIR)/datagen.c bigdict.c
 invalidDictionaries : $(ZSTD_OBJECTS) invalidDictionaries.c
 
 legacy : CPPFLAGS += -I$(ZSTDDIR)/legacy -UZSTD_LEGACY_SUPPORT -DZSTD_LEGACY_SUPPORT=4
-legacy : $(ZSTD_FILES) $(wildcard $(ZSTDDIR)/legacy/*.c) legacy.c
+legacy : $(ZSTD_FILES) $(sort $(wildcard $(ZSTDDIR)/legacy/*.c)) legacy.c
 
 decodecorpus : LDLIBS += -lm
 decodecorpus : $(filter-out zstdc_zstd_compress.o, $(ZSTD_OBJECTS)) $(ZDICT_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c decodecorpus.c
index d733f7cadc4c3a499a23994360247650898571ed..b707bd95176e5b8560d36c68bb1ea3ffddf546c3 100644 (file)
@@ -68,7 +68,7 @@ FUZZ_SRC       := \
        $(ZSTDCOMP_SRC) \
        $(ZSTDDICT_SRC) \
        $(ZSTDLEGACY_SRC)
-FUZZ_SRC := $(wildcard $(FUZZ_SRC))
+FUZZ_SRC := $(sort $(wildcard $(FUZZ_SRC)))
 
 FUZZ_D_OBJ1 := $(subst $(ZSTDDIR)/common/,d_lib_common_,$(FUZZ_SRC))
 FUZZ_D_OBJ2 := $(subst $(ZSTDDIR)/compress/,d_lib_compress_,$(FUZZ_D_OBJ1))