summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kanavin <alex.kanavin@gmail.com>2022-01-27 11:19:59 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2022-02-01 07:31:18 +0000
commitf5bfd88094df786061e849d45e407ef3359573e9 (patch)
treef660e4e28ae62d897f7728744b00aaaf6da45e33
parentb44828967a7f2e9d160fe3dee1dd39a7a745fb76 (diff)
downloadpoky-f5bfd88094df786061e849d45e407ef3359573e9.tar.gz
zstd: update 1.5.0 -> 1.5.2
Drop patches merged upstream. (From OE-Core rev: cfd76fb067e2390aa06ae6a9f9dd7cc8a8d57d09) Signed-off-by: Alexander Kanavin <alex@linutronix.de> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-extended/zstd/zstd/0001-Makefile-sort-all-wildcard-file-list-expansions.patch81
-rw-r--r--meta/recipes-extended/zstd/zstd/0001-MinGW-Build-Fixes.patch193
-rw-r--r--meta/recipes-extended/zstd/zstd_1.5.2.bb (renamed from meta/recipes-extended/zstd/zstd_1.5.0.bb)7
3 files changed, 2 insertions, 279 deletions
diff --git a/meta/recipes-extended/zstd/zstd/0001-Makefile-sort-all-wildcard-file-list-expansions.patch b/meta/recipes-extended/zstd/zstd/0001-Makefile-sort-all-wildcard-file-list-expansions.patch
deleted file mode 100644
index 3d23648f5b..0000000000
--- a/meta/recipes-extended/zstd/zstd/0001-Makefile-sort-all-wildcard-file-list-expansions.patch
+++ /dev/null
@@ -1,81 +0,0 @@
1From 77c7963c7a0f1c455f20520d5c7b1ec9b17a44fb Mon Sep 17 00:00:00 2001
2From: Alexander Kanavin <alex.kanavin@gmail.com>
3Date: Wed, 23 Dec 2020 19:14:32 +0100
4Subject: [PATCH] Makefile: sort all wildcard file list expansions
5
6Otherwise the order is non-deterministic and breaks
7reproducible builds.
8
9Upstream-Status: Submitted [https://github.com/facebook/zstd/pull/2895]
10Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
11
12---
13 programs/Makefile | 10 +++++-----
14 tests/Makefile | 4 ++--
15 tests/fuzz/Makefile | 2 +-
16 3 files changed, 8 insertions(+), 8 deletions(-)
17
18diff --git a/programs/Makefile b/programs/Makefile
19index 599fb02f..2c416467 100644
20--- a/programs/Makefile
21+++ b/programs/Makefile
22@@ -74,11 +74,11 @@ ZSTDLEGACY_DIR := $(ZSTDDIR)/legacy
23
24 vpath %.c $(ZSTDLIB_COMMON) $(ZSTDLIB_COMPRESS) $(ZSTDLIB_DECOMPRESS) $(ZDICT_DIR) $(ZSTDLEGACY_DIR)
25
26-ZSTDLIB_COMMON_C := $(wildcard $(ZSTDLIB_COMMON)/*.c)
27-ZSTDLIB_COMPRESS_C := $(wildcard $(ZSTDLIB_COMPRESS)/*.c)
28-ZSTDLIB_DECOMPRESS_C := $(wildcard $(ZSTDLIB_DECOMPRESS)/*.c)
29+ZSTDLIB_COMMON_C := $(sort $(wildcard $(ZSTDLIB_COMMON)/*.c))
30+ZSTDLIB_COMPRESS_C := $(sort $(wildcard $(ZSTDLIB_COMPRESS)/*.c))
31+ZSTDLIB_DECOMPRESS_C := $(sort $(wildcard $(ZSTDLIB_DECOMPRESS)/*.c))
32 ZSTDLIB_CORE_SRC := $(ZSTDLIB_DECOMPRESS_C) $(ZSTDLIB_COMMON_C) $(ZSTDLIB_COMPRESS_C)
33-ZDICT_SRC := $(wildcard $(ZDICT_DIR)/*.c)
34+ZDICT_SRC := $(sort $(wildcard $(ZDICT_DIR)/*.c))
35
36 ZSTD_LEGACY_SUPPORT ?= 5
37 ZSTDLEGACY_SRC :=
38@@ -93,7 +93,7 @@ ZSTDLIB_FULL_SRC = $(sort $(ZSTDLIB_CORE_SRC) $(ZSTDLEGACY_SRC) $(ZDICT_SRC))
39 ZSTDLIB_LOCAL_SRC = $(notdir $(ZSTDLIB_FULL_SRC))
40 ZSTDLIB_LOCAL_OBJ := $(ZSTDLIB_LOCAL_SRC:.c=.o)
41
42-ZSTD_CLI_SRC := $(wildcard *.c)
43+ZSTD_CLI_SRC := $(sort $(wildcard *.c))
44 ZSTD_CLI_OBJ := $(ZSTD_CLI_SRC:.c=.o)
45
46 ZSTD_ALL_SRC = $(ZSTDLIB_LOCAL_SRC) $(ZSTD_CLI_SRC)
47diff --git a/tests/Makefile b/tests/Makefile
48index 85553007..b71cdba8 100644
49--- a/tests/Makefile
50+++ b/tests/Makefile
51@@ -49,7 +49,7 @@ ZSTDDECOMP_FILES := $(ZSTDDIR)/decompress/*.c
52 ZSTD_FILES := $(ZSTDDECOMP_FILES) $(ZSTDCOMMON_FILES) $(ZSTDCOMP_FILES)
53 ZDICT_FILES := $(ZSTDDIR)/dictBuilder/*.c
54
55-ZSTD_F1 := $(wildcard $(ZSTD_FILES))
56+ZSTD_F1 := $(sort $(wildcard $(ZSTD_FILES)))
57 ZSTD_OBJ1 := $(subst $(ZSTDDIR)/common/,zstdm_,$(ZSTD_F1))
58 ZSTD_OBJ2 := $(subst $(ZSTDDIR)/compress/,zstdc_,$(ZSTD_OBJ1))
59 ZSTD_OBJ3 := $(subst $(ZSTDDIR)/decompress/,zstdd_,$(ZSTD_OBJ2))
60@@ -202,7 +202,7 @@ bigdict: $(ZSTDMT_OBJECTS) $(PRGDIR)/datagen.c bigdict.c
61 invalidDictionaries : $(ZSTD_OBJECTS) invalidDictionaries.c
62
63 legacy : CPPFLAGS += -I$(ZSTDDIR)/legacy -DZSTD_LEGACY_SUPPORT=4
64-legacy : $(ZSTD_FILES) $(wildcard $(ZSTDDIR)/legacy/*.c) legacy.c
65+legacy : $(ZSTD_FILES) $(sort $(wildcard $(ZSTDDIR)/legacy/*.c)) legacy.c
66
67 decodecorpus : LDLIBS += -lm
68 decodecorpus : $(filter-out zstdc_zstd_compress.o, $(ZSTD_OBJECTS)) $(ZDICT_FILES) $(PRGDIR)/util.c $(PRGDIR)/timefn.c decodecorpus.c
69diff --git a/tests/fuzz/Makefile b/tests/fuzz/Makefile
70index ccb574b7..b1cb2935 100644
71--- a/tests/fuzz/Makefile
72+++ b/tests/fuzz/Makefile
73@@ -62,7 +62,7 @@ FUZZ_SRC := \
74 $(ZSTDCOMP_SRC) \
75 $(ZSTDDICT_SRC) \
76 $(ZSTDLEGACY_SRC)
77-FUZZ_SRC := $(wildcard $(FUZZ_SRC))
78+FUZZ_SRC := $(sort $(wildcard $(FUZZ_SRC)))
79
80 FUZZ_D_OBJ1 := $(subst $(ZSTDDIR)/common/,d_lib_common_,$(FUZZ_SRC))
81 FUZZ_D_OBJ2 := $(subst $(ZSTDDIR)/compress/,d_lib_compress_,$(FUZZ_D_OBJ1))
diff --git a/meta/recipes-extended/zstd/zstd/0001-MinGW-Build-Fixes.patch b/meta/recipes-extended/zstd/zstd/0001-MinGW-Build-Fixes.patch
deleted file mode 100644
index a0e00dca03..0000000000
--- a/meta/recipes-extended/zstd/zstd/0001-MinGW-Build-Fixes.patch
+++ /dev/null
@@ -1,193 +0,0 @@
1From ab9a34c92eec815ef214470c927ddbe2e950e7e5 Mon Sep 17 00:00:00 2001
2From: Joshua Watt <JPEWhacker@gmail.com>
3Date: Wed, 26 May 2021 09:15:40 -0500
4Subject: [PATCH] MinGW Build Fixes
5
6Fixes building on MinGW by
7 1) Exporting the OS variable so that it is visible to sub-make
8 invocations
9 2) Fixing the extension handling so that make correctly identifies when
10 targets need to be rebuilt. Without the correct handling, make would
11 rebuild the executable targets when running `make install` because
12 it couldn't find them with the correct extension.
13
14Upstream-Status: Submitted [https://github.com/facebook/zstd/pull/2685]
15Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
16---
17 Makefile | 1 +
18 programs/Makefile | 74 +++++++++++++++++++++++------------------------
19 2 files changed, 38 insertions(+), 37 deletions(-)
20
21diff --git a/Makefile b/Makefile
22index c1908f0a..f9ce9504 100644
23--- a/Makefile
24+++ b/Makefile
25@@ -29,6 +29,7 @@ VOID = /dev/null
26 # fail on other tested distros (ubuntu, debian) even
27 # without manually specifying the TARGET_SYSTEM.
28 TARGET_SYSTEM ?= $(OS)
29+export OS
30
31 ifneq (,$(filter Windows%,$(TARGET_SYSTEM)))
32 EXT =.exe
33diff --git a/programs/Makefile b/programs/Makefile
34index 599fb02f..79b45c83 100644
35--- a/programs/Makefile
36+++ b/programs/Makefile
37@@ -209,37 +209,37 @@ SET_CACHE_DIRECTORY = \
38
39
40 .PHONY: all
41-all: zstd
42+all: zstd$(EXT)
43
44 .PHONY: allVariants
45-allVariants: zstd zstd-compress zstd-decompress zstd-small zstd-nolegacy zstd-dictBuilder
46+allVariants: zstd$(EXT) zstd-compress$(EXT) zstd-decompress$(EXT) zstd-small$(EXT) zstd-nolegacy$(EXT) zstd-dictBuilder$(EXT)
47
48 .PHONY: zstd # must always be run
49-zstd : CPPFLAGS += $(THREAD_CPP) $(ZLIBCPP) $(LZMACPP) $(LZ4CPP)
50-zstd : LDFLAGS += $(THREAD_LD) $(DEBUGFLAGS_LD)
51-zstd : LDLIBS += $(ZLIBLD) $(LZMALD) $(LZ4LD)
52-zstd : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
53+zstd$(EXT) : CPPFLAGS += $(THREAD_CPP) $(ZLIBCPP) $(LZMACPP) $(LZ4CPP)
54+zstd$(EXT) : LDFLAGS += $(THREAD_LD) $(DEBUGFLAGS_LD)
55+zstd$(EXT) : LDLIBS += $(ZLIBLD) $(LZMALD) $(LZ4LD)
56+zstd$(EXT) : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
57 ifneq (,$(filter Windows%,$(OS)))
58-zstd : $(RES_FILE)
59+zstd$(EXT) : $(RES_FILE)
60 endif
61
62 ifndef BUILD_DIR
63 # generate BUILD_DIR from flags
64
65-zstd:
66+zstd$(EXT):
67 $(SET_CACHE_DIRECTORY)
68
69 else
70 # BUILD_DIR is defined
71
72 ZSTD_OBJ := $(addprefix $(BUILD_DIR)/, $(ZSTD_ALL_OBJ))
73-$(BUILD_DIR)/zstd : $(ZSTD_OBJ)
74+$(BUILD_DIR)/zstd$(EXT) : $(ZSTD_OBJ)
75 @echo "$(THREAD_MSG)"
76 @echo "$(ZLIB_MSG)"
77 @echo "$(LZMA_MSG)"
78 @echo "$(LZ4_MSG)"
79 @echo LINK $@
80- $(CC) $(FLAGS) $^ $(LDLIBS) -o $@$(EXT)
81+ $(CC) $(FLAGS) $^ $(LDLIBS) -o $@
82
83 ifeq ($(HAVE_HASH),1)
84 SRCBIN_HASH = $(shell cat $(BUILD_DIR)/zstd 2> $(VOID) | $(HASH) | cut -f 1 -d " ")
85@@ -249,7 +249,7 @@ else
86 BIN_ISDIFFERENT = 1
87 endif
88
89-zstd : $(BUILD_DIR)/zstd
90+zstd$(EXT) : $(BUILD_DIR)/zstd$(EXT)
91 if [ $(BIN_ISDIFFERENT) -eq 1 ]; then \
92 cp -f $< $@; \
93 echo zstd build completed; \
94@@ -263,46 +263,46 @@ endif # BUILD_DIR
95 .PHONY: zstd-release
96 zstd-release: DEBUGFLAGS := -DBACKTRACE_ENABLE=0
97 zstd-release: DEBUGFLAGS_LD :=
98-zstd-release: zstd
99+zstd-release: zstd$(EXT)
100
101-zstd32 : CPPFLAGS += $(THREAD_CPP)
102-zstd32 : LDFLAGS += $(THREAD_LD)
103-zstd32 : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
104+zstd32$(EXT) : CPPFLAGS += $(THREAD_CPP)
105+zstd32$(EXT) : LDFLAGS += $(THREAD_LD)
106+zstd32$(EXT) : CPPFLAGS += -DZSTD_LEGACY_SUPPORT=$(ZSTD_LEGACY_SUPPORT)
107 ifneq (,$(filter Windows%,$(OS)))
108-zstd32 : $(RES32_FILE)
109+zstd32$(EXT) : $(RES32_FILE)
110 endif
111-zstd32 : $(ZSTDLIB_FULL_SRC) $(ZSTD_CLI_SRC)
112- $(CC) -m32 $(FLAGS) $^ -o $@$(EXT)
113+zstd32$(EXT) : $(ZSTDLIB_FULL_SRC) $(ZSTD_CLI_SRC)
114+ $(CC) -m32 $(FLAGS) $^ -o $@
115
116 ## zstd-nolegacy: same scope as zstd, with just support of legacy formats removed
117-zstd-nolegacy : LDFLAGS += $(THREAD_LD) $(ZLIBLD) $(LZMALD) $(LZ4LD) $(DEBUGFLAGS_LD)
118-zstd-nolegacy : $(ZSTDLIB_CORE_SRC) $(ZDICT_SRC) $(ZSTD_CLI_OBJ)
119- $(CC) $(FLAGS) $^ -o $@$(EXT) $(LDFLAGS)
120+zstd-nolegacy$(EXT) : LDFLAGS += $(THREAD_LD) $(ZLIBLD) $(LZMALD) $(LZ4LD) $(DEBUGFLAGS_LD)
121+zstd-nolegacy$(EXT) : $(ZSTDLIB_CORE_SRC) $(ZDICT_SRC) $(ZSTD_CLI_OBJ)
122+ $(CC) $(FLAGS) $^ -o $@ $(LDFLAGS)
123
124 .PHONY: zstd-nomt
125 zstd-nomt : THREAD_CPP :=
126 zstd-nomt : THREAD_LD :=
127 zstd-nomt : THREAD_MSG := - multi-threading disabled
128-zstd-nomt : zstd
129+zstd-nomt : zstd$(EXT)
130
131 .PHONY: zstd-nogz
132 zstd-nogz : ZLIBCPP :=
133 zstd-nogz : ZLIBLD :=
134 zstd-nogz : ZLIB_MSG := - gzip support is disabled
135-zstd-nogz : zstd
136+zstd-nogz : zstd$(EXT)
137
138 .PHONY: zstd-noxz
139 zstd-noxz : LZMACPP :=
140 zstd-noxz : LZMALD :=
141 zstd-noxz : LZMA_MSG := - xz/lzma support is disabled
142-zstd-noxz : zstd
143+zstd-noxz : zstd$(EXT)
144
145 ## zstd-dll: zstd executable linked to dynamic library libzstd (must have same version)
146 .PHONY: zstd-dll
147 zstd-dll : LDFLAGS+= -L$(ZSTDDIR)
148 zstd-dll : LDLIBS += -lzstd
149 zstd-dll : ZSTDLIB_LOCAL_SRC = xxhash.c
150-zstd-dll : zstd
151+zstd-dll : zstd$(EXT)
152
153
154 ## zstd-pgo: zstd executable optimized with PGO.
155@@ -321,23 +321,23 @@ zstd-pgo :
156 $(MAKE) zstd MOREFLAGS=-fprofile-use
157
158 ## zstd-small: minimal target, supporting only zstd compression and decompression. no bench. no legacy. no other format.
159-zstd-small: CFLAGS = -Os -s
160-zstd-frugal zstd-small: $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c fileio.c
161- $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE $^ -o $@$(EXT)
162+zstd-small$(EXT): CFLAGS = -Os -s
163+zstd-frugal$(EXT) zstd-small$(EXT): $(ZSTDLIB_CORE_SRC) zstdcli.c util.c timefn.c fileio.c
164+ $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOTRACE $^ -o $@
165
166-zstd-decompress: $(ZSTDLIB_COMMON_C) $(ZSTDLIB_DECOMPRESS_C) zstdcli.c util.c timefn.c fileio.c
167- $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOCOMPRESS -DZSTD_NOTRACE $^ -o $@$(EXT)
168+zstd-decompress$(EXT): $(ZSTDLIB_COMMON_C) $(ZSTDLIB_DECOMPRESS_C) zstdcli.c util.c timefn.c fileio.c
169+ $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NOCOMPRESS -DZSTD_NOTRACE $^ -o $@
170
171-zstd-compress: $(ZSTDLIB_COMMON_C) $(ZSTDLIB_COMPRESS_C) zstdcli.c util.c timefn.c fileio.c
172- $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NODECOMPRESS -DZSTD_NOTRACE $^ -o $@$(EXT)
173+zstd-compress$(EXT): $(ZSTDLIB_COMMON_C) $(ZSTDLIB_COMPRESS_C) zstdcli.c util.c timefn.c fileio.c
174+ $(CC) $(FLAGS) -DZSTD_NOBENCH -DZSTD_NODICT -DZSTD_NODECOMPRESS -DZSTD_NOTRACE $^ -o $@
175
176 ## zstd-dictBuilder: executable supporting dictionary creation and compression (only)
177-zstd-dictBuilder: CPPFLAGS += -DZSTD_NOBENCH -DZSTD_NODECOMPRESS -DZSTD_NOTRACE
178-zstd-dictBuilder: $(ZSTDLIB_COMMON_C) $(ZSTDLIB_COMPRESS_C) $(ZDICT_SRC) zstdcli.c util.c timefn.c fileio.c dibio.c
179- $(CC) $(FLAGS) $^ -o $@$(EXT)
180+zstd-dictBuilder$(EXT): CPPFLAGS += -DZSTD_NOBENCH -DZSTD_NODECOMPRESS -DZSTD_NOTRACE
181+zstd-dictBuilder$(EXT): $(ZSTDLIB_COMMON_C) $(ZSTDLIB_COMPRESS_C) $(ZDICT_SRC) zstdcli.c util.c timefn.c fileio.c dibio.c
182+ $(CC) $(FLAGS) $^ -o $@
183
184-zstdmt: zstd
185- ln -sf zstd zstdmt
186+zstdmt$(EXT): zstd$(EXT)
187+ ln -sf zstd$(EXT) zstdmt$(EXT)
188
189 .PHONY: generate_res
190 generate_res: $(RES64_FILE) $(RES32_FILE)
191--
1922.31.1
193
diff --git a/meta/recipes-extended/zstd/zstd_1.5.0.bb b/meta/recipes-extended/zstd/zstd_1.5.2.bb
index 51305d0562..71f439ef57 100644
--- a/meta/recipes-extended/zstd/zstd_1.5.0.bb
+++ b/meta/recipes-extended/zstd/zstd_1.5.2.bb
@@ -9,12 +9,9 @@ LICENSE = "BSD-3-Clause & GPLv2"
9LIC_FILES_CHKSUM = "file://LICENSE;md5=c7f0b161edbe52f5f345a3d1311d0b32 \ 9LIC_FILES_CHKSUM = "file://LICENSE;md5=c7f0b161edbe52f5f345a3d1311d0b32 \
10 file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0" 10 file://COPYING;md5=39bba7d2cf0ba1036f2a6e2be52fe3f0"
11 11
12SRC_URI = "git://github.com/facebook/zstd.git;branch=release;protocol=https \ 12SRC_URI = "git://github.com/facebook/zstd.git;branch=release;protocol=https"
13 file://0001-Makefile-sort-all-wildcard-file-list-expansions.patch \
14 file://0001-MinGW-Build-Fixes.patch \
15 "
16 13
17SRCREV = "a488ba114ec17ea1054b9057c26a046fc122b3b6" 14SRCREV = "e47e674cd09583ff0503f0f6defd6d23d8b718d3"
18UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)" 15UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>\d+(\.\d+)+)"
19 16
20CVE_PRODUCT = "zstandard" 17CVE_PRODUCT = "zstandard"