summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-29 11:05:48 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2024-08-29 21:58:19 +0100
commit63d77ef8935444dbfd62d2b38ca82ebbf5d8cc0e (patch)
tree0ea84a2ccbbb70f405ec756fa1c8e8a91b5ea1a5
parentcaa36ffb089d9f5b346bc0c753744e90ccda12ce (diff)
downloadpoky-63d77ef8935444dbfd62d2b38ca82ebbf5d8cc0e.tar.gz
lz4: Fix static library reproducibility issue
The autobuilder was seeing an intermittent reproducbility issue in lz4 with regard to symbol ordering in the static library. Add a patch to fix this which has been submitted upstream. Fix the SRC_URI whitespace and cleanup the patch directory naming whilst here. (From OE-Core rev: 79d6d0fa239ab0cf271c01d8169a7d41811f8b4e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/lz4/lz4/reproducibility.patch33
-rw-r--r--meta/recipes-support/lz4/lz4/run-ptest (renamed from meta/recipes-support/lz4/files/run-ptest)0
-rw-r--r--meta/recipes-support/lz4/lz4_1.10.0.bb4
3 files changed, 35 insertions, 2 deletions
diff --git a/meta/recipes-support/lz4/lz4/reproducibility.patch b/meta/recipes-support/lz4/lz4/reproducibility.patch
new file mode 100644
index 0000000000..c138986da8
--- /dev/null
+++ b/meta/recipes-support/lz4/lz4/reproducibility.patch
@@ -0,0 +1,33 @@
1lib/Makefile: Fix static library reproducibility
2
3The static library contents varies depending of the order of the object files on disk meaning
4it isn't reproducible.
5
6To avoid this, use the SRCFILES values which are already sorted, mapped to the object names
7instead.
8
9
10Upstream-Status: Submitted [https://github.com/lz4/lz4/pull/1497]
11Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
12
13Index: git/lib/Makefile
14===================================================================
15--- git.orig/lib/Makefile
16+++ git/lib/Makefile
17@@ -55,6 +55,7 @@ CFLAGS = $(DEBUGFLAGS) $(USERCFLAGS)
18 ALLFLAGS = $(CFLAGS) $(CPPFLAGS) $(LDFLAGS)
19
20 SRCFILES := $(sort $(wildcard *.c))
21+OBJFILES = $(SRCFILES:.c=.o)
22
23 include ../Makefile.inc
24
25@@ -102,7 +103,7 @@ liblz4.a: $(SRCFILES)
26 ifeq ($(BUILD_STATIC),yes) # can be disabled on command line
27 @echo compiling static library
28 $(COMPILE.c) $^
29- $(AR) rcs $@ *.o
30+ $(AR) rcs $@ $(OBJFILES)
31 endif
32
33 ifeq ($(WINBASED),yes)
diff --git a/meta/recipes-support/lz4/files/run-ptest b/meta/recipes-support/lz4/lz4/run-ptest
index f4a46a4f2c..f4a46a4f2c 100644
--- a/meta/recipes-support/lz4/files/run-ptest
+++ b/meta/recipes-support/lz4/lz4/run-ptest
diff --git a/meta/recipes-support/lz4/lz4_1.10.0.bb b/meta/recipes-support/lz4/lz4_1.10.0.bb
index 40768fb292..3b98adf42e 100644
--- a/meta/recipes-support/lz4/lz4_1.10.0.bb
+++ b/meta/recipes-support/lz4/lz4_1.10.0.bb
@@ -13,8 +13,8 @@ PE = "1"
13SRCREV = "ebb370ca83af193212df4dcbadcc5d87bc0de2f0" 13SRCREV = "ebb370ca83af193212df4dcbadcc5d87bc0de2f0"
14 14
15SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \ 15SRC_URI = "git://github.com/lz4/lz4.git;branch=release;protocol=https \
16 file://run-ptest \ 16 file://reproducibility.patch \
17 " 17 file://run-ptest"
18UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)" 18UPSTREAM_CHECK_GITTAGREGEX = "v(?P<pver>.*)"
19 19
20S = "${WORKDIR}/git" 20S = "${WORKDIR}/git"