Also add new configure flags and an upstream patch to fix a regression.

Signed-off-by: Clemens Gruber <clemens.gru...@pqgruber.com>
---

Changes since v1:
- Forgot to run git-ptx-patches

 ...ion-on-arm64-due-to-invalid-use-of-v.patch | 53 +++++++++++++++++++
 patches/libgpg-error-1.28/series              |  4 ++
 rules/libgpg-error.make                       |  6 ++-
 3 files changed, 61 insertions(+), 2 deletions(-)
 create mode 100644 
patches/libgpg-error-1.28/0001-core-Fix-regression-on-arm64-due-to-invalid-use-of-v.patch
 create mode 100644 patches/libgpg-error-1.28/series

diff --git 
a/patches/libgpg-error-1.28/0001-core-Fix-regression-on-arm64-due-to-invalid-use-of-v.patch
 
b/patches/libgpg-error-1.28/0001-core-Fix-regression-on-arm64-due-to-invalid-use-of-v.patch
new file mode 100644
index 000000000..8c7265a90
--- /dev/null
+++ 
b/patches/libgpg-error-1.28/0001-core-Fix-regression-on-arm64-due-to-invalid-use-of-v.patch
@@ -0,0 +1,53 @@
+From: Werner Koch <w...@gnupg.org>
+Date: Sun, 18 Mar 2018 17:39:43 +0100
+Subject: [PATCH] core: Fix regression on arm64 due to invalid use of va_list.
+
+* src/logging.c (_gpgrt_log_printhex): Provide a dummy arg instead of
+NULL.
+--
+
+Fix
+Suggested-by: Jakub Wilk <jw...@jwilk.net>
+
+Signed-off-by: Werner Koch <w...@gnupg.org>
+Signed-off-by: Baruch Siach <bar...@tkos.co.il>
+---
+ src/logging.c | 18 ++++++++++++++----
+ 1 file changed, 14 insertions(+), 4 deletions(-)
+
+diff --git a/src/logging.c b/src/logging.c
+index 1a4f6203d16d..d01f974e4545 100644
+--- a/src/logging.c
++++ b/src/logging.c
+@@ -1090,9 +1090,10 @@ _gpgrt_log_flush (void)
+ 
+ 
+ /* Print a hexdump of (BUFFER,LENGTH).  With FMT passed as NULL print
+- * just the raw dump, with FMT being an empty string, print a trailing
+- * linefeed, otherwise print an entire debug line with the expanded
+- * FMT followed by a possible wrapped hexdump and a final LF.  */
++ * just the raw dump (in this case ARG_PTR is not used), with FMT
++ * being an empty string, print a trailing linefeed, otherwise print
++ * an entire debug line with the expanded FMT followed by a possible
++ * wrapped hexdump and a final LF.  */
+ void
+ _gpgrt_logv_printhex (const void *buffer, size_t length,
+                       const char *fmt, va_list arg_ptr)
+@@ -1150,7 +1151,16 @@ _gpgrt_log_printhex (const void *buffer, size_t length,
+       va_end (arg_ptr);
+     }
+   else
+-    _gpgrt_logv_printhex (buffer, length, NULL, NULL);
++    {
++      /* va_list is not necessary a pointer and thus we can't use NULL
++       * because that would conflict with platforms using a straight
++       * struct for it (e.g. arm64).  We use a dummy variable instead;
++       * the static is a simple way zero it out so to not get
++       * complains about uninitialized use.  */
++      static va_list dummy_argptr;
++
++      _gpgrt_logv_printhex (buffer, length, NULL, dummy_argptr);
++    }
+ }
+ 
+ 
diff --git a/patches/libgpg-error-1.28/series b/patches/libgpg-error-1.28/series
new file mode 100644
index 000000000..d627f12d0
--- /dev/null
+++ b/patches/libgpg-error-1.28/series
@@ -0,0 +1,4 @@
+# generated by git-ptx-patches
+#tag:base --start-number 1
+0001-core-Fix-regression-on-arm64-due-to-invalid-use-of-v.patch
+# da99be1b79ee0b3994f2153e5ad33086  - git-ptx-patches magic
diff --git a/rules/libgpg-error.make b/rules/libgpg-error.make
index 96de745e6..525ab0c7a 100644
--- a/rules/libgpg-error.make
+++ b/rules/libgpg-error.make
@@ -17,8 +17,8 @@ PACKAGES-$(PTXCONF_LIBGPG_ERROR) += libgpg-error
 #
 # Paths and names
 #
-LIBGPG_ERROR_VERSION   := 1.27
-LIBGPG_ERROR_MD5       := 5217ef3e76a7275a2a3b569a12ddc989
+LIBGPG_ERROR_VERSION   := 1.28
+LIBGPG_ERROR_MD5       := 2b072f6194eb22d48cd4c7c77e59b5af
 LIBGPG_ERROR           := libgpg-error-$(LIBGPG_ERROR_VERSION)
 LIBGPG_ERROR_SUFFIX    := tar.bz2
 LIBGPG_ERROR_URL       := \
@@ -49,6 +49,8 @@ LIBGPG_ERROR_CONF_OPT := \
        $(GLOBAL_LARGE_FILE_OPTION) \
        --disable-nls \
        --disable-rpath \
+       --disable-log-clock \
+       --disable-werror \
        
--enable-build-timestamp="$(PTXDIST_VERSION_YEAR)-$(PTXDIST_VERSION_MONTH)-01T00:00+0000"
 \
        --disable-languages \
        --disable-doc \
-- 
2.17.0


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

Reply via email to