blob: 050fc2c7e1113957a348418cd4d2d643c51859fe [file] [log] [blame]
Brad Bishop316dfdd2018-06-25 12:45:53 -04001From 7f1357529d23b356b45fbb0dd7388588162e4cb8 Mon Sep 17 00:00:00 2001
2From: Hongxu Jia <hongxu.jia@windriver.com>
3Date: Wed, 10 Jan 2018 14:43:20 +0800
4Subject: [PATCH] src/Makefile.am: improve reproducibility
5
6Remove build host references from the internally
7generated file version.c. The references get compiled into
8executables, which leads to non-reproducible builds.
9The removed references (--sysroot, -fdebug-prefix-map) were
10only used as part of the `wget --version' which do not have
11side effect.
12
13...
14$ wget --version
15GNU Wget 1.14 built on linux-gnu.
16
17+digest +https +ipv6 +iri +large-file +nls +ntlm +opie +ssl/openssl
18
19Wgetrc:
20 /etc/wgetrc (system)
21Locale: /usr/share/locale
22Compile: gcc -DHAVE_CONFIG_H -DSYSTEM_WGETRC="/etc/wgetrc"
23 -DLOCALEDIR="/usr/share/locale" -I. -I../lib -I../lib -O2 -g -pipe
24 -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong
25 --param=ssp-buffer-size=4 -grecord-gcc-switches -m64 -mtune=generic
26Link: gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions
27 -fstack-protector-strong --param=ssp-buffer-size=4
28 -grecord-gcc-switches -m64 -mtune=generic -lssl -lcrypto
29 /usr/lib64/libssl.so /usr/lib64/libcrypto.so /usr/lib64/libz.so
30 -ldl -lz -lz -lidn -luuid -lpcre ftp-opie.o openssl.o http-ntlm.o
31 ../lib/libgnu.a
32...
33
34Upstream-Status: Inappropriate [oe-core specific]
35
36Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Andrew Geisslerc182c622020-05-15 14:13:32 -050037
38sed use of DEBUG_PREFIX_MAP must treat whitespace the same as the
39echo command building version.c or the expression match will fail.
40
41Signed-off-by: Joe Slater <jslater@windriver.com>
Brad Bishop316dfdd2018-06-25 12:45:53 -040042---
43 src/Makefile.am | 4 ++++
44 1 file changed, 4 insertions(+)
45
46diff --git a/src/Makefile.am b/src/Makefile.am
47index 28c0be2..44084a3 100644
48--- a/src/Makefile.am
49+++ b/src/Makefile.am
50@@ -87,9 +87,13 @@ version.c: $(wget_SOURCES) ../lib/libgnu.a
51 echo '#include "version.h"' >> $@
52 echo 'const char *version_string = "@VERSION@";' >> $@
53 echo 'const char *compilation_string = "'$(COMPILE)'";' \
54+ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
Andrew Geisslerc182c622020-05-15 14:13:32 -050055+ -e "s,$$(echo $(DEBUG_PREFIX_MAP)),,g" \
Brad Bishop316dfdd2018-06-25 12:45:53 -040056 | $(ESCAPEQUOTE) >> $@
57 echo 'const char *link_string = "'$(CCLD) $(AM_CFLAGS) $(CFLAGS) \
58 $(AM_LDFLAGS) $(LDFLAGS) $(LIBS) $(wget_LDADD)'";' \
59+ | sed -e "s,$(TOOLCHAIN_OPTIONS),,g" \
Andrew Geisslerc182c622020-05-15 14:13:32 -050060+ -e "s,$$(echo $(DEBUG_PREFIX_MAP)),,g" \
Brad Bishop316dfdd2018-06-25 12:45:53 -040061 | $(ESCAPEQUOTE) >> $@
62
63 css.c: $(srcdir)/css.l
64--
651.8.3.1
66