From 9b14b5c1094c66ed54784f2666c49ad0ec431517 Mon Sep 17 00:00:00 2001 From: sevan Date: Fri, 17 Apr 2015 14:36:17 +0000 Subject: Re-introduce previous fix for building on Solaris SPARC, confirmed to resolve issue on Solaris 10 SPARC. pkg/26815 https://bugs.g10code.com/gnupg/issue1703 Reviewed by wiz@ --- security/libgcrypt/distinfo | 3 ++- security/libgcrypt/patches/patch-mpi_longlong.h | 25 +++++++++++++++++++++++++ 2 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 security/libgcrypt/patches/patch-mpi_longlong.h (limited to 'security') diff --git a/security/libgcrypt/distinfo b/security/libgcrypt/distinfo index 6cbff73f450..871384094c4 100644 --- a/security/libgcrypt/distinfo +++ b/security/libgcrypt/distinfo @@ -1,9 +1,10 @@ -$NetBSD: distinfo,v 1.56 2015/02/28 00:14:25 wiz Exp $ +$NetBSD: distinfo,v 1.57 2015/04/17 14:36:17 sevan Exp $ SHA1 (libgcrypt-1.6.3.tar.bz2) = 9456e7b64db9df8360a1407a38c8c958da80bbf1 RMD160 (libgcrypt-1.6.3.tar.bz2) = cce0256a6c71e0f9df260799418e887ffa62f832 Size (libgcrypt-1.6.3.tar.bz2) = 2494052 bytes SHA1 (patch-aa) = 3dd44b8745128a6788d24f9eb00002624a5fc52b SHA1 (patch-configure) = b9abea2f665ed0d8e0f36cf207f2cb9667bdfb4d +SHA1 (patch-mpi_longlong.h) = 901dfd7852d0608d612e38975be8af2d0548b120 SHA1 (patch-random_rndunix.c) = 8069cf981fe6166cd7accce1258d8e47859657bb SHA1 (patch-src_visibility.h) = 8cbbf6803ab34b4b7dda832aa8ee18247aa89518 diff --git a/security/libgcrypt/patches/patch-mpi_longlong.h b/security/libgcrypt/patches/patch-mpi_longlong.h new file mode 100644 index 00000000000..d72d4dbc166 --- /dev/null +++ b/security/libgcrypt/patches/patch-mpi_longlong.h @@ -0,0 +1,25 @@ +$NetBSD: patch-mpi_longlong.h,v 1.1 2015/04/17 14:36:17 sevan Exp $ + +Fix for compiling on Solaris SPARC with gcc. + + If __sparcv8 is defined, use the SPARC v8 version of udiv_qrnnd. Without + this change, udiv_qrnnd will not be defined using the SPARC v8 udiv + instruction, and the default SPARC v7 case of defining it to be the native + __gmpn_udiv_qrnnd will be used, but this does not exist on SPARC v8, so + at link time, the user will get an error about _gmpn_udiv_qrnnd being + undefined. gcc defines __sparcv8. + +From PR pkg/26815 +https://bugs.g10code.com/gnupg/issue1703 + +--- mpi/longlong.h.orig 2015-04-17 14:24:14.000000000 +0000 ++++ mpi/longlong.h +@@ -1287,7 +1287,7 @@ typedef unsigned int UTItype __attribute + "rJ" ((USItype)(al)), \ + "rI" ((USItype)(bl)) \ + __CLOBBER_CC) +-#if defined (__sparc_v8__) ++#if defined (__sparc_v8__) || defined(__sparcv8) + /* Don't match immediate range because, 1) it is not often useful, + 2) the 'I' flag thinks of the range as a 13 bit signed interval, + while we want to match a 13 bit interval, sign extended to 32 bits, -- cgit v1.2.3