diff --git a/gmp-6.1.2-conftest.patch b/gmp-6.1.2-conftest.patch new file mode 100644 index 0000000..65d5868 --- /dev/null +++ b/gmp-6.1.2-conftest.patch @@ -0,0 +1,31 @@ +--- acinclude.m4.orig 2017-01-04 11:40:34.672561902 +0100 ++++ acinclude.m4 2017-01-04 11:40:42.324648573 +0100 +@@ -741,7 +741,7 @@ + long i; + for (i = 0; i < 88 + 1; i++) + a[i] = ~0L; +- r = malloc (10000 * sizeof (unsigned long)); ++ r = calloc (10000, sizeof (unsigned long)); + r2 = r; + for (i = 0; i < 528; i += 23) + { +--- configure.orig 2017-01-04 11:42:54.678147652 +0100 ++++ configure 2017-01-04 11:46:36.468659624 +0100 +@@ -6776,7 +6776,7 @@ + long i; + for (i = 0; i < 88 + 1; i++) + a[i] = ~0L; +- r = malloc (10000 * sizeof (unsigned long)); ++ r = calloc (10000, sizeof (unsigned long)); + r2 = r; + for (i = 0; i < 528; i += 23) + { +@@ -8394,7 +8394,7 @@ + long i; + for (i = 0; i < 88 + 1; i++) + a[i] = ~0L; +- r = malloc (10000 * sizeof (unsigned long)); ++ r = calloc (10000, sizeof (unsigned long)); + r2 = r; + for (i = 0; i < 528; i += 23) + { diff --git a/gmp.changes b/gmp.changes index 8f505d2..396394f 100644 --- a/gmp.changes +++ b/gmp.changes @@ -13,6 +13,7 @@ Wed Jan 4 08:20:17 UTC 2017 - rguenther@suse.com code selection for many CPUs. * Mini-GMP: Updated to the latest development version, including new functions mpn_com and mpn_neg. +- Add gmp-6.1.2-conftest.patch to fix configure test. ------------------------------------------------------------------- Thu Jun 30 07:34:19 UTC 2016 - mpluskal@suse.com diff --git a/gmp.spec b/gmp.spec index 9e0f52b..b3d24da 100644 --- a/gmp.spec +++ b/gmp.spec @@ -28,6 +28,7 @@ Source1: https://gmplib.org/download/%{name}/%{name}-%{version}.tar.xz.si Source2: %{name}.keyring Source3: baselibs.conf Patch0: gmp-noexec.diff +Patch1: gmp-6.1.2-conftest.patch BuildRequires: gcc-c++ BuildRequires: xz BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -68,6 +69,7 @@ huge numbers (integer and floating point). %prep %setup -q %patch0 +%patch1 %build export CFLAGS="%{optflags} -fexceptions"