summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMingli Yu <Mingli.Yu@windriver.com>2018-11-15 23:09:59 -0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-12-01 11:38:36 +0000
commita04d5ed02680f4ca42c01dfdeed2e6749440c390 (patch)
tree773f15ec8e0ef43634845a2d5e7d40010d8074b9
parent93db812f0c8a5612e95464d29f04f2e48e9879bc (diff)
downloadpoky-a04d5ed02680f4ca42c01dfdeed2e6749440c390.tar.gz
nspr: improve reproducibility
Remove _BUILD_STRING and _BUILD_TIME in _pl_bld.h to avoid introducing timestamp in the .so library such as libnspr4.so as below: $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so [snip] 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49 [snip] [YOCTO #12639] (From OE-Core rev: a3ca6272845c33f48430210470f133034ad8399d) Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch103
-rw-r--r--meta/recipes-support/nspr/nspr_4.20.bb1
2 files changed, 104 insertions, 0 deletions
diff --git a/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch b/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
new file mode 100644
index 0000000000..90fe45f34d
--- /dev/null
+++ b/meta/recipes-support/nspr/nspr/Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch
@@ -0,0 +1,103 @@
1From 8a592e4ead4ed6befe6044da3dd2dc7523c33905 Mon Sep 17 00:00:00 2001
2From: Mingli Yu <Mingli.Yu@windriver.com>
3Date: Fri, 16 Nov 2018 13:52:49 +0800
4Subject: [PATCH] Makefile.in: remove _BUILD_STRING and _BUILD_TIME
5
6Remove _BUILD_STRING and _BUILD_TIME to avoid
7adding timestamp to _pl_bld.h which can result
8in adding timestamp in library file such as
9libnspr4.so.
10 $ readelf --wide --decompress --hex-dump=.rodata libnspr4.so
11 [snip]
12 0x00004000 32303138 2d31312d 31352030 353a3439 2018-11-15 05:49
13 [snip]
14
15Upstream-Status: Pending
16
17Signed-off-by: Mingli Yu <Mingli.Yu@windriver.com>
18---
19 lib/ds/Makefile.in | 8 +-------
20 lib/libc/src/Makefile.in | 8 +-------
21 lib/prstreams/Makefile.in | 8 +-------
22 pr/src/Makefile.in | 8 +-------
23 4 files changed, 4 insertions(+), 28 deletions(-)
24
25diff --git a/lib/ds/Makefile.in b/lib/ds/Makefile.in
26index e737791..b578476 100644
27--- a/lib/ds/Makefile.in
28+++ b/lib/ds/Makefile.in
29@@ -114,13 +114,7 @@ GARBAGE += $(TINC)
30
31 $(TINC):
32 @$(MAKE_OBJDIR)
33- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
34- @if test ! -z "$(SH_NOW)"; then \
35- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
36- else \
37- true; \
38- fi
39- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
40+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
41
42
43 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
44diff --git a/lib/libc/src/Makefile.in b/lib/libc/src/Makefile.in
45index e8a6d9f..978ed28 100644
46--- a/lib/libc/src/Makefile.in
47+++ b/lib/libc/src/Makefile.in
48@@ -116,13 +116,7 @@ GARBAGE += $(TINC)
49
50 $(TINC):
51 @$(MAKE_OBJDIR)
52- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
53- @if test ! -z "$(SH_NOW)"; then \
54- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
55- else \
56- true; \
57- fi
58- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
59+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
60
61
62 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
63diff --git a/lib/prstreams/Makefile.in b/lib/prstreams/Makefile.in
64index aeb2944..f318097 100644
65--- a/lib/prstreams/Makefile.in
66+++ b/lib/prstreams/Makefile.in
67@@ -116,13 +116,7 @@ endif
68
69 $(TINC):
70 @$(MAKE_OBJDIR)
71- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
72- @if test ! -z "$(SH_NOW)"; then \
73- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
74- else \
75- true; \
76- fi
77- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
78+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
79
80
81 $(OBJDIR)/plvrsion.$(OBJ_SUFFIX): plvrsion.c $(TINC)
82diff --git a/pr/src/Makefile.in b/pr/src/Makefile.in
83index 19c5a69..b4ac31c 100644
84--- a/pr/src/Makefile.in
85+++ b/pr/src/Makefile.in
86@@ -326,13 +326,7 @@ GARBAGE += $(TINC)
87
88 $(TINC):
89 @$(MAKE_OBJDIR)
90- @$(ECHO) '#define _BUILD_STRING "$(SH_DATE)"' > $(TINC)
91- @if test ! -z "$(SH_NOW)"; then \
92- $(ECHO) '#define _BUILD_TIME $(SH_NOW)$(SUF)' >> $(TINC); \
93- else \
94- true; \
95- fi
96- @$(ECHO) '#define _PRODUCTION "$(PROD)"' >> $(TINC)
97+ @$(ECHO) '#define _PRODUCTION "$(PROD)"' > $(TINC)
98
99
100 $(OBJDIR)/prvrsion.$(OBJ_SUFFIX): prvrsion.c $(TINC)
101--
1022.7.4
103
diff --git a/meta/recipes-support/nspr/nspr_4.20.bb b/meta/recipes-support/nspr/nspr_4.20.bb
index fe3b4bd2ed..98ca909631 100644
--- a/meta/recipes-support/nspr/nspr_4.20.bb
+++ b/meta/recipes-support/nspr/nspr_4.20.bb
@@ -12,6 +12,7 @@ SRC_URI = "http://ftp.mozilla.org/pub/nspr/releases/v${PV}/src/nspr-${PV}.tar.gz
12 file://0002-Add-nios2-support.patch \ 12 file://0002-Add-nios2-support.patch \
13 file://0001-md-Fix-build-with-musl.patch \ 13 file://0001-md-Fix-build-with-musl.patch \
14 file://0004-Add-ARC-support.patch \ 14 file://0004-Add-ARC-support.patch \
15 file://Makefile.in-remove-_BUILD_STRING-and-_BUILD_TIME.patch \
15 file://nspr.pc.in \ 16 file://nspr.pc.in \
16" 17"
17 18