diff --git a/grep-gnulib-ppc64le.patch b/grep-gnulib-ppc64le.patch new file mode 100644 index 0000000..ee05437 --- /dev/null +++ b/grep-gnulib-ppc64le.patch @@ -0,0 +1,41 @@ +diff --git a/gnulib-tests/test-isnanl.h b/gnulib-tests/test-isnanl.h +index 06e6a7c..2df10f8 100644 +--- a/gnulib-tests/test-isnanl.h ++++ b/gnulib-tests/test-isnanl.h +@@ -51,6 +51,15 @@ main () + /* A bit pattern that is different from a Quiet NaN. With a bit of luck, + it's a Signalling NaN. */ + { ++#if defined __powerpc__ && LDBL_MANT_DIG == 106 ++ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are ++ represented as the corresponding 64-bit IEEE values in the first double; ++ the second is ignored. Manipulate only the first double. */ ++ #undef NWORDS ++ #define NWORDS \ ++ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) ++#endif ++ + memory_long_double m; + m.value = NaNl (); + # if LDBL_EXPBIT0_BIT > 0 +diff --git a/gnulib-tests/test-signbit.c b/gnulib-tests/test-signbit.c +index e8ea097..7e24292 100644 +--- a/gnulib-tests/test-signbit.c ++++ b/gnulib-tests/test-signbit.c +@@ -151,6 +151,16 @@ test_signbitl () + #define NWORDS \ + ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) + typedef union { long double value; unsigned int word[NWORDS]; } memory_long_double; ++ ++#if defined __powerpc__ && LDBL_MANT_DIG == 106 ++ /* This is PowerPC "double double", a pair of two doubles. Inf and Nan are ++ represented as the corresponding 64-bit IEEE values in the first double; ++ the second is ignored. Manipulate only the first double. */ ++ #undef NWORDS ++ #define NWORDS \ ++ ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) ++#endif ++ + memory_long_double m; + m.value = zerol / zerol; + # if LDBL_EXPBIT0_BIT > 0 diff --git a/grep.changes b/grep.changes index 7bd04fe..a60f321 100644 --- a/grep.changes +++ b/grep.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Dec 20 01:36:52 UTC 2013 - uweigand@de.ibm.com + +- grep-gnulib-ppc64le.patch: Fix imported gnulib long double math + tests for little-endian PowerPC. + ------------------------------------------------------------------- Wed Dec 11 20:36:13 UTC 2013 - andreas.stieger@gmx.de diff --git a/grep.spec b/grep.spec index 3da8f85..366bb59 100644 --- a/grep.spec +++ b/grep.spec @@ -34,6 +34,8 @@ Group: Productivity/Text/Utilities Source0: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz Source2: http://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: http://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring +# Fix imported gnulib long double math tests for little-endian PowerPC +Patch1: grep-gnulib-ppc64le.patch BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -43,6 +45,7 @@ the matching lines. %prep %setup -q +%patch1 -p1 %if 0%{?suse_version} < 1120 echo "ac_cv_search_pcre_compile=\${ac_cv_search_pcre_compile=%{_libdir}/libpcre.a}" >config.cache %endif