guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

branch master updated: gnu: mingw: Add mingw-w64 reproducibility patches


From: guix-commits
Subject: branch master updated: gnu: mingw: Add mingw-w64 reproducibility patches.
Date: Sat, 04 Apr 2020 16:23:59 -0400

This is an automated email from the git hooks/post-receive script.

carl pushed a commit to branch master
in repository guix.

The following commit(s) were added to refs/heads/master by this push:
     new 4719b71  gnu: mingw: Add mingw-w64 reproducibility patches.
4719b71 is described below

commit 4719b715726303d680cd6f65caad96bfa194cda6
Author: Carl Dong <address@hidden>
AuthorDate: Tue Mar 24 17:19:33 2020 -0400

    gnu: mingw: Add mingw-w64 reproducibility patches.
    
    These patches were originally found at the debian mingw-w64 team's
    mingw-w64 repo, and should improve the reproducibility of our mingw-w64
    toolchain.
    
    * gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch: New file.
    * gnu/packages/patches/mingw-w64-reproducible-gendef.patch: New file.
    * gnu/local.mk (dist_patch_DATA): Update accordingly.
    * gnu/packages/mingw.scm (make-mingw-w64): Apply patches.
---
 gnu/local.mk                                       |  2 ++
 gnu/packages/mingw.scm                             |  5 ++++-
 .../patches/mingw-w64-dlltool-temp-prefix.patch    | 26 ++++++++++++++++++++++
 .../patches/mingw-w64-reproducible-gendef.patch    | 23 +++++++++++++++++++
 4 files changed, 55 insertions(+), 1 deletion(-)

diff --git a/gnu/local.mk b/gnu/local.mk
index 8328165..713d97d 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1201,6 +1201,8 @@ dist_patch_DATA =                                         
\
   %D%/packages/patches/metabat-fix-compilation.patch           \
   %D%/packages/patches/mhash-keygen-test-segfault.patch                \
   %D%/packages/patches/mingw-w64-6.0.0-gcc.patch               \
+  %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch     \
+  %D%/packages/patches/mingw-w64-reproducible-gendef.patch     \
   %D%/packages/patches/minisat-friend-declaration.patch                \
   %D%/packages/patches/minisat-install.patch                   \
   %D%/packages/patches/mpc123-initialize-ao.patch              \
diff --git a/gnu/packages/mingw.scm b/gnu/packages/mingw.scm
index d0785c5..b37f6c6 100644
--- a/gnu/packages/mingw.scm
+++ b/gnu/packages/mingw.scm
@@ -53,7 +53,10 @@ specified, recurse and return a mingw-w64 with support for 
winpthreads."
                       "mingw-w64-release/mingw-w64-v" version ".tar.bz2"))
                 (sha256
                  (base32 
"0a5njsa2zw2ssdz10jkb10mhrf3cb8qp9avs89zqmw4n6pzxy85a"))
-                (patches (search-patches "mingw-w64-6.0.0-gcc.patch"))))
+                (patches
+                 (search-patches "mingw-w64-6.0.0-gcc.patch"
+                                 "mingw-w64-dlltool-temp-prefix.patch"
+                                 "mingw-w64-reproducible-gendef.patch"))))
       (native-inputs `(("xgcc-core" ,(if xgcc xgcc (cross-gcc triplet)))
                        ("xbinutils" ,(if xbinutils xbinutils (cross-binutils 
triplet)))
                        ,@(if with-winpthreads?
diff --git a/gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch 
b/gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch
new file mode 100644
index 0000000..432cafc
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch
@@ -0,0 +1,26 @@
+This following patch was originally found at the debian mingw-w64 team's
+mingw-w64 repo located here:
+https://salsa.debian.org/mingw-w64-team/mingw-w64.git
+
+Invoke the following in the aforementioned repo to see the original patch:
+
+  $ git show 4974e2c:debian/patches/dlltool-temp-prefix.patch
+
+Description: Specify dlltool's temp prefix
+Author: Stephen Kitt <address@hidden>
+
+By default dlltool uses its pid for the object files it generates.
+Enforcing its temp prefix allows the files it generates to be
+reproducible.
+
+--- a/mingw-w64-crt/Makefile.am
++++ b/mingw-w64-crt/Makefile.am
+@@ -36,7 +36,7 @@
+   DTDEF32=$(GENLIB) $(DLLTOOLFLAGS32) $(AM_DLLTOOLFLAGS)
+   DTDEF64=$(GENLIB) $(DLLTOOLFLAGS64) $(AM_DLLTOOLFLAGS)
+ else
+-  AM_DLLTOOLFLAGS=-k --as=$(AS) --output-lib $@
++  AM_DLLTOOLFLAGS=-k --as=$(AS) --output-lib $@ --temp-prefix $$(basename $@ 
.a)
+   DLLTOOLFLAGSARM32=-m arm
+   DLLTOOLFLAGSARM64=-m arm64
+   DLLTOOLFLAGS32=--as-flags=--32 -m i386
diff --git a/gnu/packages/patches/mingw-w64-reproducible-gendef.patch 
b/gnu/packages/patches/mingw-w64-reproducible-gendef.patch
new file mode 100644
index 0000000..ee676af
--- /dev/null
+++ b/gnu/packages/patches/mingw-w64-reproducible-gendef.patch
@@ -0,0 +1,23 @@
+This following patch was originally found at the debian mingw-w64 team's
+mingw-w64 repo located here:
+https://salsa.debian.org/mingw-w64-team/mingw-w64.git
+
+Invoke the following in the aforementioned repo to see the original patch:
+
+  $ git show 4974e2c:debian/patches/reproducible-gendef.patch
+
+Description: Drop __DATE__ from gendef
+Author: Stephen Kitt <address@hidden>
+
+This allows gendef to be built reproducibly.
+
+--- a/mingw-w64-tools/gendef/src/gendef.c
++++ b/mingw-w64-tools/gendef/src/gendef.c
+@@ -196,7 +196,6 @@
+                    "  By default, the output files are named after their DLL 
counterparts\n"
+                    "  gendef MYDLL.DLL     Produces MYDLL.def\n"
+                    "  gendef - MYDLL.DLL   Prints the exports to stdout\n");
+-  fprintf (stderr, "\nBuilt on %s\n", __DATE__);
+   fprintf (stderr, "\nReport bugs to <address@hidden>\n");
+   exit (0);
+ }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]