23278250 update libgpg-error to version 1.22
authorJan Friedel <jan.friedel@oracle.com>
Fri, 17 Jun 2016 08:45:56 -0700
changeset 6239 925323933ffd
parent 6238 e530e1a7f687
child 6240 7fdcf093fdc2
23278250 update libgpg-error to version 1.22
components/libgpg-error/Makefile
components/libgpg-error/libgpg-error.p5m
components/libgpg-error/patches/10_gen-posix-lock-obj.patch
components/libgpg-error/patches/10_gpgrt_lock_t-misalignment_1.patch
components/libgpg-error/patches/10_gpgrt_lock_t-misalignment_2.patch
components/libgpg-error/patches/10_gpgrt_lock_t-misalignment_3.patch
--- a/components/libgpg-error/Makefile	Fri Jun 17 08:45:56 2016 -0700
+++ b/components/libgpg-error/Makefile	Fri Jun 17 08:45:56 2016 -0700
@@ -26,15 +26,15 @@
 include ../../make-rules/shared-macros.mk
 
 COMPONENT_NAME=		libgpg-error
-COMPONENT_VERSION=	1.21
+COMPONENT_VERSION=	1.22
 COMPONENT_PROJECT_URL=  ftp://ftp.gnupg.org/gcrypt/$(COMPONENT_NAME)
 COMPONENT_ARCHIVE=	$(COMPONENT_SRC).tar.bz2
 COMPONENT_ARCHIVE_HASH= \
-    sha256:b7dbdb3cad63a740e9f0c632a1da32d4afdb694ec86c8625c98ea0691713b84d
+    sha256:f2a04ee6317bdb41a625bea23fdc7f0b5a63fb677f02447c647ed61fb9e69d7b
 COMPONENT_ARCHIVE_URL=  ftp://ftp.gnupg.org/gcrypt/$(COMPONENT_NAME)/$(COMPONENT_ARCHIVE)
 COMPONENT_BUGDB=	library/libgpg-error
 
-TPNO=			26277
+TPNO=			28599
 
 COMPONENT_BUILD_TARGETS = all info
 
--- a/components/libgpg-error/libgpg-error.p5m	Fri Jun 17 08:45:56 2016 -0700
+++ b/components/libgpg-error/libgpg-error.p5m	Fri Jun 17 08:45:56 2016 -0700
@@ -42,12 +42,12 @@
 file path=usr/bin/gpg-error
 file usr/bin/$(MACH32)/gpg-error-config path=usr/bin/gpg-error-config
 file path=usr/include/gpg-error.h
-link path=usr/lib/$(MACH64)/libgpg-error.so target=libgpg-error.so.0.17.0
-link path=usr/lib/$(MACH64)/libgpg-error.so.0 target=libgpg-error.so.0.17.0
-file path=usr/lib/$(MACH64)/libgpg-error.so.0.17.0
-link path=usr/lib/libgpg-error.so target=libgpg-error.so.0.17.0
-link path=usr/lib/libgpg-error.so.0 target=libgpg-error.so.0.17.0
-file path=usr/lib/libgpg-error.so.0.17.0
+link path=usr/lib/$(MACH64)/libgpg-error.so target=libgpg-error.so.0.18.0
+link path=usr/lib/$(MACH64)/libgpg-error.so.0 target=libgpg-error.so.0.18.0
+file path=usr/lib/$(MACH64)/libgpg-error.so.0.18.0
+link path=usr/lib/libgpg-error.so target=libgpg-error.so.0.18.0
+link path=usr/lib/libgpg-error.so.0 target=libgpg-error.so.0.18.0
+file path=usr/lib/libgpg-error.so.0.18.0
 file path=usr/share/aclocal/gpg-error.m4
 file path=usr/share/common-lisp/source/gpg-error/gpg-error-codes.lisp
 file path=usr/share/common-lisp/source/gpg-error/gpg-error-package.lisp
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/components/libgpg-error/patches/10_gen-posix-lock-obj.patch	Fri Jun 17 08:45:56 2016 -0700
@@ -0,0 +1,58 @@
+This patch fixes gen-posix-lock-obj used during library build process to
+generate gpg-error.h.  libgpg-error package delivers the gpg-error.h
+header file to the target system. When built on Solaris, the updated
+part of the code generates definition of the gpgrt_lock_t so that it
+respects the required alignment on SPARCv7 (32bit).
+
+The fix can be tested using 'gmake test' in the libgcrypt component. If
+not applied, the t-lock and random tests fail consistently. For more
+information see: https://bugs.gnupg.org/gnupg/issue2378
+
+The fix was created internally and offered for integration to the
+upstream.  It has not been accepted yet.
+
+--- ./src/gen-posix-lock-obj.c.orig	Mon Jun 13 08:07:53 2016
++++ ./src/gen-posix-lock-obj.c	Mon Jun 13 08:08:40 2016
+@@ -42,21 +42,8 @@
+ #endif
+ #endif
+ 
+-/* Special requirements for certain platforms.  */
+-# define USE_LONG_DOUBLE_FOR_ALIGNMENT 0
+-#if defined(__sun) && !defined (__LP64__) && !defined(_LP64)
+-/* Solaris on 32-bit architecture.  */
+-# define USE_DOUBLE_FOR_ALIGNMENT 1
+-#else
+-# define USE_DOUBLE_FOR_ALIGNMENT 0
+-#endif
+-#if defined(__hppa__)
+-# define USE_16BYTE_ALIGNMENT 1
+-#else
+-# define USE_16BYTE_ALIGNMENT 0
+-#endif
+ 
+-#if USE_16BYTE_ALIGNMENT && !HAVE_GCC_ATTRIBUTE_ALIGNED
++#if defined(__hppa__) && !HAVE_GCC_ATTRIBUTE_ALIGNED
+ # error compiler is not able to enforce a 16 byte alignment
+ #endif
+ 
+@@ -122,12 +109,14 @@
+           "\n"
+           "#define GPGRT_LOCK_INITIALIZER {%d,{{",
+           SIZEOF_PTHREAD_MUTEX_T,
+-# if USE_16BYTE_ALIGNMENT
++/* Special requirements for certain platforms. */
++# ifdef (__hppa__)
+           "    int _x16_align __attribute__ ((aligned (16)));\n",
+-# elif USE_DOUBLE_FOR_ALIGNMENT
+-          "    double _xd_align;\n",
+-# elif USE_LONG_DOUBLE_FOR_ALIGNMENT
+-          "    long double _xld_align;\n",
++# elif defined(__sun)
++	  "#if (defined(__sparc) || defined(__sparc__)) && \\\n"
++	  "    !defined (__LP64__) && !defined(_LP64)\n"
++          "    double _xd_align;\n"
++	  "#endif\n",
+ # else
+           "",
+ # endif
--- a/components/libgpg-error/patches/10_gpgrt_lock_t-misalignment_1.patch	Fri Jun 17 08:45:56 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,129 +0,0 @@
-#
-# Partial fix for: https://bugs.gnupg.org/gnupg/issue2144.
-#
-# The patch comes from the upstream. Add support for Solaris, fixing HPPA:
-# http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff;h=5168b97fb5e2eebdc99b40f96f9b6289647e87d2
-#
---- 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,25 @@ else
-   fi
- fi
- 
-+# Default value for GPG_ERROR_CONFIG_LIBS
-+config_libs="-lgpg-error"
-+
-+#
-+# Check for other libraries (now only for -lrt).
-+#
-+# Save and restore LIBS so e.g., -lrt, isn't added to it.  Otherwise, *all*
-+# programs in the package would end up linked with that potentially-shared
-+# library, inducing unnecessary run-time overhead.
-+LIB_SCHED_YIELD=
-+AC_SUBST([LIB_SCHED_YIELD])
-+gl_saved_libs=$LIBS
-+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])
-+LIBS=$gl_saved_libs
-+
- #
- # Prepare building of estream
- #
-@@ -424,7 +429,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 +549,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 22de456..83356ad 100644
---- a/src/gen-posix-lock-obj.c
-+++ b/src/gen-posix-lock-obj.c
-@@ -43,15 +43,15 @@
- #endif
- 
- /* Special requirements for certain platforms.  */
--#if defined(__hppa__) && defined(__linux__)
--# define USE_16BYTE_ALIGNMENT 1
-+#if defined(__solaris__) && (defined (__ILP32__) || defined(_ILP32))
-+# 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 +116,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;
--- a/components/libgpg-error/patches/10_gpgrt_lock_t-misalignment_2.patch	Fri Jun 17 08:45:56 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#
-# Partial fix for: https://bugs.gnupg.org/gnupg/issue2144.
-#
-# The patch comes from the upstream. Fix for Solaris:
-# http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff;h=34b07146bbb0863436fc9381a84314b18bdfb807
-#
---- a/src/gen-posix-lock-obj.c
-+++ b/src/gen-posix-lock-obj.c
-@@ -43,7 +43,7 @@
- #endif
- 
- /* Special requirements for certain platforms.  */
--#if defined(__solaris__) && (defined (__ILP32__) || defined(_ILP32))
-+#if defined(__solaris__) && !defined (__LP64__) && !defined(_LP64)
- # define USE_DOUBLE_FOR_ALIGNMENT 1
- #else
- # define USE_DOUBLE_FOR_ALIGNMENT 0
-
--- a/components/libgpg-error/patches/10_gpgrt_lock_t-misalignment_3.patch	Fri Jun 17 08:45:56 2016 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,18 +0,0 @@
-#
-# Partial fix for: https://bugs.gnupg.org/gnupg/issue2144.
-#
-# The patch comes from the upstream. Fix detecting Solaris operating system.
-# http://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgpg-error.git;a=commitdiff;h=f7a77c5c236ecec846de9be46703026f9b01008f
-#
---- a/src/gen-posix-lock-obj.c
-+++ b/src/gen-posix-lock-obj.c
-@@ -43,7 +43,8 @@
- #endif
- 
- /* Special requirements for certain platforms.  */
--#if defined(__solaris__) && !defined (__LP64__) && !defined(_LP64)
-+#if defined(__sun) && !defined (__LP64__) && !defined(_LP64)
-+/* Solaris on 32-bit architecture.  */
- # define USE_DOUBLE_FOR_ALIGNMENT 1
- #else
- # define USE_DOUBLE_FOR_ALIGNMENT 0