From 4719b715726303d680cd6f65caad96bfa194cda6 Mon Sep 17 00:00:00 2001 From: Carl Dong Date: Tue, 24 Mar 2020 17:19:33 -0400 Subject: 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. --- .../patches/mingw-w64-dlltool-temp-prefix.patch | 26 ++++++++++++++++++++++ .../patches/mingw-w64-reproducible-gendef.patch | 23 +++++++++++++++++++ 2 files changed, 49 insertions(+) create mode 100644 gnu/packages/patches/mingw-w64-dlltool-temp-prefix.patch create mode 100644 gnu/packages/patches/mingw-w64-reproducible-gendef.patch (limited to 'gnu/packages/patches') 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 0000000000..432cafc162 --- /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 + +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 0000000000..ee676af7a0 --- /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 + +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 \n"); + exit (0); + } -- cgit v1.2.3