Fixed gnulib tests on ppc64(le)

This commit is contained in:
Jakub Čajka 2014-06-23 14:38:45 +02:00 committed by Ondřej Vašík
parent 8d24562387
commit 2af6179bec
2 changed files with 46 additions and 1 deletions

View File

@ -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

View File

@ -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 <jcajka@redhat.com> - 8.22-16
- fix failed tests on ppc(backport from gnulib upstream)
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 8.22-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild