[Pkg-gnupg-commit] [libgpg-error] 08/08: patch libgpg-error so that it builds cleanly with mingw32

Daniel Kahn Gillmor dkg at fifthhorseman.net
Tue Feb 9 04:45:11 UTC 2016


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

dkg pushed a commit to branch master
in repository libgpg-error.

commit 7e73c77aa6c3d30b66e4175f30551aab4d8321c8
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date:   Fri Feb 5 13:29:14 2016 -0500

    patch libgpg-error so that it builds cleanly with mingw32
    
    without this patch, we get an error during the library build on win32
---
 ...space-in-gpg-error.def-linker-script-for-.patch | 41 ++++++++++++++++++++++
 debian/patches/series                              |  1 +
 2 files changed, 42 insertions(+)

diff --git a/debian/patches/0002-avoid-whitespace-in-gpg-error.def-linker-script-for-.patch b/debian/patches/0002-avoid-whitespace-in-gpg-error.def-linker-script-for-.patch
new file mode 100644
index 0000000..9a78dd9
--- /dev/null
+++ b/debian/patches/0002-avoid-whitespace-in-gpg-error.def-linker-script-for-.patch
@@ -0,0 +1,41 @@
+From: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
+Date: Mon, 8 Feb 2016 23:30:22 -0500
+Subject: avoid whitespace in gpg-error.def linker script for mingw32
+
+When cross-building for Windows with ./configure --host
+i686-w64-mingw32 on recent versions of debian, the library doesn't get
+built properly because of a difference in the whitespace produced in
+the library's .def linker script.
+
+The errors look like:
+
+/bin/bash ../libtool  --tag=CC   --mode=link i686-w64-mingw32-gcc  -g -Os -Wall -Wpointer-arith -Wno-psabi -no-undefined -export-symbols gpg-error.def  -XCClinker -static-libgcc -version-info 17:0:17 -Xlinker --no-insert-timestamp -o libgpg-error.la -rpath /usr/share/win32/lib libgpg_error_la-w32-gettext.lo libgpg_error_la-w32-lock.lo libgpg_error_la-w32-thread.lo libgpg_error_la-init.lo libgpg_error_la-version.lo libgpg_error_la-estream.lo libgpg_error_la-estream-printf.lo libgpg_error_ [...]
+libtool: link: /usr/bin/i686-w64-mingw32-nm -B  .libs/libgpg_error_la-w32-gettext.o .libs/libgpg_error_la-w32-lock.o .libs/libgpg_error_la-w32-thread.o .libs/libgpg_error_la-init.o .libs/libgpg_error_la-version.o .libs/libgpg_error_la-estream.o .libs/libgpg_error_la-estream-printf.o .libs/libgpg_error_la-strsource.o .libs/libgpg_error_la-strerror.o .libs/libgpg_error_la-code-to-errno.o .libs/libgpg_error_la-code-from-errno.o .libs/libgpg_error_la-visibility.o .libs/versioninfo.o   | sed  [...]
+libtool: link: if test "x`/bin/sed 1q .libs/libgpg-error.def`" = xEXPORTS; then cp .libs/libgpg-error.def .libs/libgpg-error-0.dll.def; else echo EXPORTS > .libs/libgpg-error-0.dll.def; cat .libs/libgpg-error.def >> .libs/libgpg-error-0.dll.def; fi
+libtool: link:  i686-w64-mingw32-gcc -shared .libs/libgpg-error-0.dll.def  .libs/libgpg_error_la-w32-gettext.o .libs/libgpg_error_la-w32-lock.o .libs/libgpg_error_la-w32-thread.o .libs/libgpg_error_la-init.o .libs/libgpg_error_la-version.o .libs/libgpg_error_la-estream.o .libs/libgpg_error_la-estream-printf.o .libs/libgpg_error_la-strsource.o .libs/libgpg_error_la-strerror.o .libs/libgpg_error_la-code-to-errno.o .libs/libgpg_error_la-code-from-errno.o .libs/libgpg_error_la-visibility.o . [...]
+/usr/bin/i686-w64-mingw32-ld: .libs/libgpg-error-0.dll.def:4: syntax error
+/usr/bin/i686-w64-mingw32-ld:.libs/libgpg-error-0.dll.def: file format not recognized; treating as linker script
+/usr/bin/i686-w64-mingw32-ld:.libs/libgpg-error-0.dll.def:3: syntax error
+collect2: error: ld returned 1 exit status
+Makefile:654: recipe for target 'libgpg-error.la' failed
+make[5]: *** [libgpg-error.la] Error 1
+make[5]: Leaving directory '/home/dkg/src/pkg-gnupg/libgpg-error/build-win32/src'
+
+With this patch, the "/usr/bin/sed 1q" line recognizes that the file
+is already a valid linker script and doesn't try to tweak it further.
+---
+ src/gpg-error.def.in | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/gpg-error.def.in b/src/gpg-error.def.in
+index 16de809..517f38a 100644
+--- a/src/gpg-error.def.in
++++ b/src/gpg-error.def.in
+@@ -23,7 +23,6 @@
+  */
+ 
+ #include <config.h>
+-
+ EXPORTS
+  gpg_strerror                 @1
+  gpg_strerror_r               @2
diff --git a/debian/patches/series b/debian/patches/series
index a45150a..dae2fc7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1 +1,2 @@
 0001-avoid-identifying-as-beta.patch
+0002-avoid-whitespace-in-gpg-error.def-linker-script-for-.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/libgpg-error.git



More information about the Pkg-gnupg-commit mailing list