From 2af6179bec2f30a541211d68e3c4e0ebc8b5620f Mon Sep 17 00:00:00 2001 From: Jakub Čajka Date: Jun 24 2014 10:34:04 +0000 Subject: Fixed gnulib tests on ppc64(le) --- diff --git a/coreutils-ppc-gnulib-tests.patch b/coreutils-ppc-gnulib-tests.patch new file mode 100644 index 0000000..f8634ed --- /dev/null +++ b/coreutils-ppc-gnulib-tests.patch @@ -0,0 +1,39 @@ +diff -up coreutils-8.22/gnulib-tests/test-isnanl.h.ppc coreutils-8.22/gnulib-tests/test-isnanl.h +--- coreutils-8.22/gnulib-tests/test-isnanl.h.ppc 2014-06-23 14:01:05.925541920 +0200 ++++ coreutils-8.22/gnulib-tests/test-isnanl.h 2014-06-23 14:01:39.437617584 +0200 +@@ -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 -up coreutils-8.22/gnulib-tests/test-signbit.c.ppc coreutils-8.22/gnulib-tests/test-signbit.c +--- coreutils-8.22/gnulib-tests/test-signbit.c.ppc 2013-12-04 15:53:33.000000000 +0100 ++++ coreutils-8.22/gnulib-tests/test-signbit.c 2014-06-23 13:59:20.378307385 +0200 +@@ -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/coreutils.spec b/coreutils.spec index 5be272b..0d202ff 100644 --- a/coreutils.spec +++ b/coreutils.spec @@ -1,7 +1,7 @@ Summary: A set of basic GNU tools commonly used in shell scripts Name: coreutils Version: 8.22 -Release: 15%{?dist} +Release: 16%{?dist} License: GPLv3+ Group: System Environment/Base Url: http://www.gnu.org/software/coreutils/ @@ -16,6 +16,8 @@ Source106: coreutils-colorls.csh Patch1: coreutils-8.22-cp-selinux.patch Patch2: coreutils-8.22-datetzcrash.patch Patch3: coreutils-8.22-dd-sparsetest-xfsspeculativeprealloc.patch +#backport of patch from gnulib fixing tests on powerPC +Patch4: coreutils-ppc-gnulib-tests.patch # Our patches #general patch to workaround koji build system issues @@ -128,6 +130,7 @@ the old GNU fileutils, sh-utils, and textutils packages. %patch1 -p1 -b .nullcontext %patch2 -p1 -b .tzcrash %patch3 -p1 -b .xfs +%patch4 -p1 -b .ppc # Our patches %patch100 -p1 -b .configure @@ -374,6 +377,9 @@ fi %{_sbindir}/chroot %changelog +* Mon Jun 23 2014 Jakub Čajka - 8.22-16 +- fix failed tests on ppc(backport from gnulib upstream) + * Sat Jun 07 2014 Fedora Release Engineering - 8.22-15 - Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild