[Pkg-gnupg-commit] [libgpg-error] 01/05: add more lock object headers from upstream for cross-compiling.
Daniel Kahn Gillmor
dkg at fifthhorseman.net
Fri Apr 22 04:59:44 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 fea37e7bd62986027977824cf41b3e6746a9459a
Author: Daniel Kahn Gillmor <dkg at fifthhorseman.net>
Date: Fri Apr 22 00:17:33 2016 -0400
add more lock object headers from upstream for cross-compiling.
---
.../0004-Add-new-lock-obj-pub-for-NIOS2.patch | 52 ++++++
...fg-alias-for-x86_64-pc-linux-gnuhardened1.patch | 21 +++
...-and-HPPA-this-is-a-collection-of-upstrea.patch | 193 +++++++++++++++++++++
...lock-obj-pub-files-for-armv5-armv6-x86_64.patch | 137 +++++++++++++++
debian/patches/series | 4 +
5 files changed, 407 insertions(+)
diff --git a/debian/patches/0004-Add-new-lock-obj-pub-for-NIOS2.patch b/debian/patches/0004-Add-new-lock-obj-pub-for-NIOS2.patch
new file mode 100644
index 0000000..93b6e60
--- /dev/null
+++ b/debian/patches/0004-Add-new-lock-obj-pub-for-NIOS2.patch
@@ -0,0 +1,52 @@
+From: Marek Vasut <marex at denx.de>
+Date: Wed, 13 Jan 2016 18:12:58 +0100
+Subject: Add new lock-obj-pub for NIOS2.
+
+src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h: New.
+---
+ src/Makefile.am | 1 +
+ src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h | 23 +++++++++++++++++++++++
+ 2 files changed, 24 insertions(+)
+ create mode 100644 src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index e4fe305..8aca7df 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -56,6 +56,7 @@ lock_obj_pub = \
+ syscfg/lock-obj-pub.mips-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.mips64el-unknown-linux-gnuabi64.h \
+ syscfg/lock-obj-pub.mipsel-unknown-linux-gnu.h \
++ syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.or1k-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.powerpc-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.powerpc64-unknown-linux-gnu.h \
+diff --git a/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h
+new file mode 100644
+index 0000000..dbd46da
+--- /dev/null
++++ b/src/syscfg/lock-obj-pub.nios2-unknown-linux-gnu.h
+@@ -0,0 +1,23 @@
++## lock-obj-pub.nios2-unknown-linux-gnu.h
++## File created by gen-posix-lock-obj - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++ long _vers;
++ union {
++ volatile char _priv[24];
++ long _x_align;
++ long *_xp_align;
++ } u;
++} gpgrt_lock_t;
++
++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
diff --git a/debian/patches/0005-Add-syscfg-alias-for-x86_64-pc-linux-gnuhardened1.patch b/debian/patches/0005-Add-syscfg-alias-for-x86_64-pc-linux-gnuhardened1.patch
new file mode 100644
index 0000000..6a89404
--- /dev/null
+++ b/debian/patches/0005-Add-syscfg-alias-for-x86_64-pc-linux-gnuhardened1.patch
@@ -0,0 +1,21 @@
+From: Werner Koch <wk at gnupg.org>
+Date: Wed, 27 Jan 2016 10:12:25 +0100
+Subject: Add syscfg alias for x86_64-pc-linux-gnuhardened1
+
+--
+---
+ src/mkheader.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/src/mkheader.c b/src/mkheader.c
+index 875a0f5..0d3d6ba 100644
+--- a/src/mkheader.c
++++ b/src/mkheader.c
+@@ -81,6 +81,7 @@ canon_host_triplet (const char *triplet)
+ {"i586-pc-gnu"},
+ {"i486-pc-kfreebsd-gnu", "i686-pc-kfreebsd-gnu"},
+ {"i586-pc-kfreebsd-gnu"},
++ {"x86_64-pc-linux-gnuhardened1", "x86_64-pc-linux-gnu" },
+
+ { NULL }
+ };
diff --git a/debian/patches/0006-fix-Solaris-and-HPPA-this-is-a-collection-of-upstrea.patch b/debian/patches/0006-fix-Solaris-and-HPPA-this-is-a-collection-of-upstrea.patch
new file mode 100644
index 0000000..54ae9a1
--- /dev/null
+++ b/debian/patches/0006-fix-Solaris-and-HPPA-this-is-a-collection-of-upstrea.patch
@@ -0,0 +1,193 @@
+From: NIIBE Yutaka <gniibe at fsij.org>
+Date: Fri, 26 Feb 2016 09:29:14 +0900
+Subject: fix Solaris and HPPA (this is a collection of upstream Solaris fixes)
+MIME-Version: 1.0
+Content-Type: text/plain; charset="utf-8"
+Content-Transfer-Encoding: 8bit
+
+Add support for Solaris, fixing HPPA.
+
+* configure.ac (HAVE_GCC_ATTRIBUTE_ALIGNED): Remove.
+(LIB_SCHED_YIELD): New. Check sched_yield in -lrt.
+* src/gen-posix-lock-obj.c (USE_16BYTE_ALIGNMENT): Remove.
+(USE_DOUBLE_FOR_ALIGNMENT, USE_LONG_DOUBLE_FOR_ALIGNMENT): New.
+* src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h: Update.
+
+--
+
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+
+Fix for Solaris.
+
+* src/gen-posix-lock-obj.c (USE_DOUBLE_FOR_ALIGNMENT): Check LP64.
+
+--
+
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+
+This fixes commit 5168b97.
+
+For Solaris, add -lrt correctly.
+
+* configure.ac (LIB_SCHED_YIELD): Not avoiding defining LIB.
+
+--
+
+This fixes commit 5168b97 for Solaris linking issue. It tried to add
+-lrt for build on Solaris for gpg-error, but it wrongly avoids adding
+it also to LIB, which actually is needed.
+
+Reported-by: Tom G. Christensen <tgc at jupiterrise.com>
+
+Thanks also to Jörn Clausen, who submitted a report to our BTS.
+
+GnuPG-bug-id: 1671
+
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+
+Fix detecting Solaris operating system.
+
+* src/gen-posix-lock-obj.c (USE_DOUBLE_FOR_ALIGNMENT): Check for
+the macro __sun.
+
+--
+Signed-off-by: NIIBE Yutaka <gniibe at fsij.org>
+
+This fixes commit 5168b97 and 34b0714.
+
+Thanks to Ibraheem Saleh and Thomas Klausner for testing.
+
+Thanks to Tom G. Christensen for suggesting the fix with the
+useful link: https://sourceforge.net/p/predef/wiki/Home/
+
+Thanks to Nelson H. F. Beebe to inform the tool:
+http://www.math.utah.edu/~beebe/cc-defs
+
+GnuPG-bug-id: 2144
+---
+ configure.ac | 38 ++++++++++--------------
+ src/gen-posix-lock-obj.c | 21 +++++++------
+ src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h | 2 +-
+ 3 files changed, 28 insertions(+), 33 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 2d27cc6..5d3c06c 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -274,20 +274,6 @@ if test "$GCC" = yes; then
+ fi
+
+ #
+-# Check whether the compiler supports the GCC style aligned attribute
+-#
+-AC_CACHE_CHECK([whether the GCC style aligned attribute is supported],
+- [gcry_cv_gcc_attribute_aligned],
+- [gcry_cv_gcc_attribute_aligned=no
+- AC_COMPILE_IFELSE([AC_LANG_SOURCE(
+- [[struct { int a; } foo __attribute__ ((aligned (16)));]])],
+- [gcry_cv_gcc_attribute_aligned=yes])])
+-if test "$gcry_cv_gcc_attribute_aligned" = "yes" ; then
+- AC_DEFINE(HAVE_GCC_ATTRIBUTE_ALIGNED,1,
+- [Defined if a GCC style "__attribute__ ((aligned (n))" is supported])
+-fi
+-
+-#
+ # Check for ELF visibility support.
+ #
+ AC_CACHE_CHECK(whether the visibility attribute is supported,
+@@ -416,6 +402,20 @@ else
+ fi
+ fi
+
++# Default value for GPG_ERROR_CONFIG_LIBS
++config_libs="-lgpg-error"
++
++#
++# Check for other libraries (now only for -lrt).
++#
++LIB_SCHED_YIELD=
++AC_SUBST([LIB_SCHED_YIELD])
++AC_SEARCH_LIBS([sched_yield], [rt posix4],
++ [if test "$ac_cv_search_sched_yield" != "none required"; then
++ LIB_SCHED_YIELD=$ac_cv_search_sched_yield
++ config_libs="$config_libs $LIB_SCHED_YIELD"
++ fi])
++
+ #
+ # Prepare building of estream
+ #
+@@ -424,7 +424,7 @@ estream_INIT
+ #
+ # Substitution used for gpg-error-config
+ #
+-GPG_ERROR_CONFIG_LIBS="-lgpg-error"
++GPG_ERROR_CONFIG_LIBS="$config_libs"
+ if test "x$LIBTHREAD" != x; then
+ GPG_ERROR_CONFIG_LIBS="${GPG_ERROR_CONFIG_LIBS} ${LIBTHREAD}"
+ fi
+@@ -544,11 +544,3 @@ echo "
+ Revision: mym4_revision (mym4_revision_dec)
+ Platform: $host$tmp
+ "
+-if test "$gcry_cv_gcc_attribute_aligned" != "yes" ; then
+-cat <<G10EOF
+-***
+-*** Please note that your compiler does not support the GCC style
+-*** aligned attribute. Using this software may evoke bus errors.
+-***
+-G10EOF
+-fi
+diff --git a/src/gen-posix-lock-obj.c b/src/gen-posix-lock-obj.c
+index 595d379..5564301 100644
+--- a/src/gen-posix-lock-obj.c
++++ b/src/gen-posix-lock-obj.c
+@@ -43,15 +43,16 @@
+ #endif
+
+ /* Special requirements for certain platforms. */
+-#if defined(__hppa__) && defined(__linux__)
+-# define USE_16BYTE_ALIGNMENT 1
++#if defined(__sun) && !defined (__LP64__) && !defined(_LP64)
++/* Solaris on 32-bit architecture. */
++# define USE_DOUBLE_FOR_ALIGNMENT 1
+ #else
+-# define USE_16BYTE_ALIGNMENT 0
++# define USE_DOUBLE_FOR_ALIGNMENT 0
+ #endif
+-
+-
+-#if USE_16BYTE_ALIGNMENT && !HAVE_GCC_ATTRIBUTE_ALIGNED
+-# error compiler is not able to enforce a 16 byte alignment
++#if defined(__hppa__)
++# define USE_LONG_DOUBLE_FOR_ALIGNMENT 1
++#else
++# define USE_LONG_DOUBLE_FOR_ALIGNMENT 0
+ #endif
+
+ #ifdef USE_POSIX_THREADS
+@@ -116,8 +117,10 @@ main (void)
+ "\n"
+ "#define GPGRT_LOCK_INITIALIZER {%d,{{",
+ SIZEOF_PTHREAD_MUTEX_T,
+-# if USE_16BYTE_ALIGNMENT
+- " int _x16_align __attribute__ ((aligned (16)));\n",
++# if USE_DOUBLE_FOR_ALIGNMENT
++ " double _xd_align;\n",
++# elif USE_LONG_DOUBLE_FOR_ALIGNMENT
++ " long double _xld_align;\n",
+ # else
+ "",
+ # endif
+diff --git a/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h b/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h
+index b57bb76..3682577 100644
+--- a/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h
++++ b/src/syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h
+@@ -7,7 +7,7 @@ typedef struct
+ long _vers;
+ union {
+ volatile char _priv[48];
+- int _x16_align __attribute__ ((aligned (16)));
++ long double _xld_align;
+ long _x_align;
+ long *_xp_align;
+ } u;
diff --git a/debian/patches/0007-syscfg-Add-lock-obj-pub-files-for-armv5-armv6-x86_64.patch b/debian/patches/0007-syscfg-Add-lock-obj-pub-files-for-armv5-armv6-x86_64.patch
new file mode 100644
index 0000000..1ae9e02
--- /dev/null
+++ b/debian/patches/0007-syscfg-Add-lock-obj-pub-files-for-armv5-armv6-x86_64.patch
@@ -0,0 +1,137 @@
+From: Kylie McClain <somasis at exherbo.org>
+Date: Tue, 8 Mar 2016 21:40:33 -0500
+Subject: syscfg: Add lock-obj-pub files for {armv5, armv6,
+ x86_64}-musl targets
+
+* src/syscfg/lock-obj-pub.armv5-unknown-linux-musleabi.h: New.
+* src/syscfg/lock-obj-pub.armv6-unknown-linux-musleabihf.h New.
+* src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h: New.
+* src/Makefile.am (lock_obj_pub): Add files.
+
+--
+This patch adds three new precompiled lock-obj-pub files:
+ - armv5-unknown-linux-musleabi
+ - armv6-unknown-linux-musleabihf
+ - x86_64-pc-linux-musl
+
+ChangeLog lines and Makefile patch by -wk
+---
+ src/Makefile.am | 3 +++
+ .../lock-obj-pub.armv5-unknown-linux-musleabi.h | 23 ++++++++++++++++++++
+ .../lock-obj-pub.armv6-unknown-linux-musleabihf.h | 23 ++++++++++++++++++++
+ src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h | 25 ++++++++++++++++++++++
+ 4 files changed, 74 insertions(+)
+ create mode 100644 src/syscfg/lock-obj-pub.armv5-unknown-linux-musleabi.h
+ create mode 100644 src/syscfg/lock-obj-pub.armv6-unknown-linux-musleabihf.h
+ create mode 100644 src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h
+
+diff --git a/src/Makefile.am b/src/Makefile.am
+index 8aca7df..c1363ae 100644
+--- a/src/Makefile.am
++++ b/src/Makefile.am
+@@ -48,6 +48,8 @@ lock_obj_pub = \
+ syscfg/lock-obj-pub.arm-unknown-linux-gnueabi.h \
+ syscfg/lock-obj-pub.arm-unknown-linux-gnueabihf.h \
+ syscfg/lock-obj-pub.arm-apple-darwin.h \
++ syscfg/lock-obj-pub.armv5-unknown-linux-musleabi.h \
++ syscfg/lock-obj-pub.armv6-unknown-linux-musleabihf.h \
+ syscfg/lock-obj-pub.hppa-unknown-linux-gnu.h \
+ syscfg/lock-obj-pub.i686-pc-gnu.h \
+ syscfg/lock-obj-pub.i686-pc-kfreebsd-gnu.h \
+@@ -68,6 +70,7 @@ lock_obj_pub = \
+ syscfg/lock-obj-pub.x86_64-pc-kfreebsd-gnu.h \
+ syscfg/lock-obj-pub.x86_64-pc-linux-gnu.h \
+ syscfg/lock-obj-pub.x86_64-pc-linux-gnux32.h \
++ syscfg/lock-obj-pub.x86_64-pc-linux-musl.h \
+ syscfg/lock-obj-pub.mingw32.h
+
+
+diff --git a/src/syscfg/lock-obj-pub.armv5-unknown-linux-musleabi.h b/src/syscfg/lock-obj-pub.armv5-unknown-linux-musleabi.h
+new file mode 100644
+index 0000000..c7b6165
+--- /dev/null
++++ b/src/syscfg/lock-obj-pub.armv5-unknown-linux-musleabi.h
+@@ -0,0 +1,23 @@
++## lock-obj-pub.armv5-unknown-linux-musleabi.h
++## File created by gen-posix-lock-obj - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++ long _vers;
++ union {
++ volatile char _priv[24];
++ long _x_align;
++ long *_xp_align;
++ } u;
++} gpgrt_lock_t;
++
++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
+diff --git a/src/syscfg/lock-obj-pub.armv6-unknown-linux-musleabihf.h b/src/syscfg/lock-obj-pub.armv6-unknown-linux-musleabihf.h
+new file mode 100644
+index 0000000..6535a9b
+--- /dev/null
++++ b/src/syscfg/lock-obj-pub.armv6-unknown-linux-musleabihf.h
+@@ -0,0 +1,23 @@
++## lock-obj-pub.armv6-unknown-linux-musleabihf.h
++## File created by gen-posix-lock-obj - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++ long _vers;
++ union {
++ volatile char _priv[24];
++ long _x_align;
++ long *_xp_align;
++ } u;
++} gpgrt_lock_t;
++
++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
+diff --git a/src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h b/src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h
+new file mode 100644
+index 0000000..1b059f4
+--- /dev/null
++++ b/src/syscfg/lock-obj-pub.x86_64-pc-linux-musl.h
+@@ -0,0 +1,25 @@
++## lock-obj-pub.x86_64-pc-linux-musl.h
++## File created by gen-posix-lock-obj - DO NOT EDIT
++## To be included by mkheader into gpg-error.h
++
++typedef struct
++{
++ long _vers;
++ union {
++ volatile char _priv[40];
++ long _x_align;
++ long *_xp_align;
++ } u;
++} gpgrt_lock_t;
++
++#define GPGRT_LOCK_INITIALIZER {1,{{0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0, \
++ 0,0,0,0,0,0,0,0}}}
++##
++## Local Variables:
++## mode: c
++## buffer-read-only: t
++## End:
++##
diff --git a/debian/patches/series b/debian/patches/series
index 46e7f1e..ee6360f 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,7 @@
0001-avoid-identifying-as-beta.patch
0002-Measure-revision-by-length-of-debian-changelog.patch
0003-avoid-whitespace-in-gpg-error.def-linker-script-for-.patch
+0004-Add-new-lock-obj-pub-for-NIOS2.patch
+0005-Add-syscfg-alias-for-x86_64-pc-linux-gnuhardened1.patch
+0006-fix-Solaris-and-HPPA-this-is-a-collection-of-upstrea.patch
+0007-syscfg-Add-lock-obj-pub-files-for-armv5-armv6-x86_64.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