components/libgcrypt/patches/01_sparcv8.patch
author Jan Friedel <jan.friedel@oracle.com>
Fri, 17 Jun 2016 08:45:56 -0700
changeset 6240 7fdcf093fdc2
permissions -rw-r--r--
23498052 update libgcrypt to version 1.7.0 22840429 problem in LIBRARY/LIBGCRYPT


The patch fixes the gcc portability on Solaris 9 SPARC boxes.

In the mpi/longlong.h adds __sparcv8 as an alias for __sparc_v8__. If
not applied, the compilation process fails during linkage with a
missing/unresolved symbol __udiv_qrnnd.

This patch originally comes from the upstream and it was locally updated
to reflect indentation added to the file in the 1.7 branch; the original
patch was applied on the 1.6 branch but it has been withdrawn for 1.7.
https://git.gnupg.org/cgi-bin/gitweb.cgi?p=libgcrypt.git;a=commit;h=d2816248461c24a7ea81a1de2f562f481ccc9edd

--- ./mpi/longlong.h.orig	Thu Jun  2 03:11:06 2016
+++ ./mpi/longlong.h	Thu Jun  2 03:11:33 2016
@@ -1293,7 +1293,7 @@
 	     "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,