diff --git a/gmp-6.0.0-ppc64-gcd.diff b/gmp-6.0.0-ppc64-gcd.diff new file mode 100644 index 0000000..c503cb7 --- /dev/null +++ b/gmp-6.0.0-ppc64-gcd.diff @@ -0,0 +1,22 @@ + +# HG changeset patch +# User Torbjorn Granlund +# Date 1395835068 -3600 +# Node ID 4a6d258b467f661da0894cc60ecd060f2e3c67c7 +# Parent 301ce2788826a2d4d2725bd5cf01e998638db37a +Provide default for BMOD_1_TO_MOD_1_THRESHOLD. + +diff -r 301ce2788826 -r 4a6d258b467f mpn/powerpc64/mode64/gcd_1.asm +--- a/mpn/powerpc64/mode64/gcd_1.asm Tue Mar 25 15:34:52 2014 +0100 ++++ b/mpn/powerpc64/mode64/gcd_1.asm Wed Mar 26 12:57:48 2014 +0100 +@@ -43,6 +43,9 @@ + define(`n', `r4') + define(`v0', `r5') + ++ifdef(`BMOD_1_TO_MOD_1_THRESHOLD',, ++ `define(`BMOD_1_TO_MOD_1_THRESHOLD',30)') ++ + EXTERN_FUNC(mpn_mod_1) + EXTERN_FUNC(mpn_modexact_1c_odd) + + diff --git a/gmp.changes b/gmp.changes index 78f27f3..49dccf1 100644 --- a/gmp.changes +++ b/gmp.changes @@ -32,6 +32,7 @@ Wed Mar 26 09:39:48 UTC 2014 - rguenther@suse.com * Better support for applications which use the mpz_t type, but nevertheless need to call some of the lower-level mpn functions. See the documentation for mpz_limbs_read and related functions. +- gmp-6.0.0-ppc64-gcd.diff: Fix build on ppc64 and ppc64le ------------------------------------------------------------------- Wed Dec 4 10:42:28 UTC 2013 - anton@samba.org diff --git a/gmp.spec b/gmp.spec index 90978f4..039f7af 100644 --- a/gmp.spec +++ b/gmp.spec @@ -31,6 +31,7 @@ Url: http://gmplib.org/ Source: ftp://ftp.gmplib.org/pub/%{name}/%{name}-%{version}.tar.bz2 Source2: baselibs.conf Patch0: gmp-noexec.diff +Patch1: gmp-6.0.0-ppc64-gcd.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -74,11 +75,15 @@ huge numbers (integer and floating point). %setup -q %ifnarch %arm %patch0 +%patch1 -p1 %endif %build -export CFLAGS="$RPM_OPT_FLAGS -fexceptions"; -%configure \ +export CFLAGS="$RPM_OPT_FLAGS -fexceptions" +# Do not use %configure here, that will break build on SLE11 +./configure \ + --prefix=%{_prefix} \ + --libdir=%{_libdir} \ --enable-cxx \ --enable-fat make %{?_smp_mflags}