[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[tor-commits] [tor-browser-build/master] Bug 40090: NSIS 3.06.1 still needs timestamp patch
commit 8b94652d56490e59fff098abecae02c903794972
Author: Georg Koppen <gk@xxxxxxxxxxxxxx>
Date: Mon Sep 14 13:49:03 2020 +0000
Bug 40090: NSIS 3.06.1 still needs timestamp patch
---
projects/nsis/build | 5 +++++
projects/nsis/config | 1 +
projects/nsis/no-insert-timestamp.patch | 27 +++++++++++++++++++++++++++
3 files changed, 33 insertions(+)
diff --git a/projects/nsis/build b/projects/nsis/build
index 54287db..41f7c1a 100755
--- a/projects/nsis/build
+++ b/projects/nsis/build
@@ -8,6 +8,11 @@ tar -C /var/tmp/build -xf nsis-[% c('version') %].tar.bz2
tar -C /var/tmp/build -xf [% c('input_files_by_name/zlib') %]
cd /var/tmp/build/nsis-[% c('version') %]-src
+# Adding --no-insert-timestamp to APPEND_LINKFLAGS is not working as it
+# is used for both the host and cross-compiled parts, but this option is
+# only valid for the Windows linker. Therefore we add it using a patch
+# to the cross-compilation part only. Still needed as of 3.06.1, see: #40090.
+patch -p1 < $rootdir/no-insert-timestamp.patch
[% IF c("var/windows-x86_64") %]
# Seems like setting TARGET_ARCH is not enough so we need to patch build.cpp
diff --git a/projects/nsis/config b/projects/nsis/config
index 36f29e2..f6dd12d 100644
--- a/projects/nsis/config
+++ b/projects/nsis/config
@@ -17,6 +17,7 @@ input_files:
- filename: 'nsis-[% c("version") %].tar.bz2'
URL: 'https://downloads.sourceforge.net/nsis/nsis-[% c("version") %]-src.tar.bz2'
sha256sum: 9b5d68bf1874a7b393432410c7e8c376f174d2602179883845d2508152153ff0
+ - filename: no-insert-timestamp.patch
- name: '[% c("var/compiler") %]'
project: '[% c("var/compiler") %]'
- name: zlib
diff --git a/projects/nsis/no-insert-timestamp.patch b/projects/nsis/no-insert-timestamp.patch
new file mode 100644
index 0000000..8053b82
--- /dev/null
+++ b/projects/nsis/no-insert-timestamp.patch
@@ -0,0 +1,27 @@
+diff -ur nsis-3.03-src/SCons/Config/gnu nsis-3.03-src.n/SCons/Config/gnu
+--- nsis-3.03-src/SCons/Config/gnu 2017-10-06 15:30:20.000000000 -0400
++++ nsis-3.03-src.n/SCons/Config/gnu 2018-06-17 13:26:05.945495151 -0400
+@@ -102,6 +102,7 @@
+ stub_env.Append(LINKFLAGS = ['$NODEFLIBS_FLAG']) # no standard libraries
+ stub_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
+ stub_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
++stub_env.Append(LINKFLAGS = ['-Wl,--no-insert-timestamp']) # remove timestamps for reproducible builds
+
+ stub_uenv = stub_env.Clone()
+ stub_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
+@@ -142,6 +143,7 @@
+ plugin_env.Append(LINKFLAGS = ['$MAP_FLAG']) # generate map file
+ plugin_env.Append(LINKFLAGS = ['-static-libgcc']) # remove libgcc*.dll dependency
+ plugin_env.Append(LINKFLAGS = ['-static-libstdc++']) # remove libstdc++*.dll dependency
++plugin_env.Append(LINKFLAGS = ['-Wl,--no-insert-timestamp']) # remove timestamps for reproducible builds
+
+ plugin_uenv = plugin_env.Clone()
+ plugin_uenv.Append(CPPDEFINES = ['_UNICODE', 'UNICODE'])
+@@ -181,6 +183,7 @@
+
+ util_env.Append(LINKFLAGS = ['-mwindows']) # build windows executables
+ util_env.Append(LINKFLAGS = ['$ALIGN_FLAG']) # 512 bytes align
++util_env.Append(LINKFLAGS = ['-Wl,--no-insert-timestamp']) # remove timestamps for reproducible builds
+
+
+ conf = FlagsConfigure(util_env)
_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits