forked from pool/coreutils
Accepting request 212043 from Base:System
The "gnulib" package contains a number of floating-point test cases that do not work correctly with the PowerPC long double ("double double") format. These tests "accidentally" succeeded anyway in the big-endian variant, but are now actually failing in little-endian mode. As is usual for gnulib, those tests end up copied into the source code of various packages that use gnulib, including coreutils, findutils, grep, and libunistring. A patch to fix the tests for ppc64le has been submitted to upstream to the bug-gnulib mailing list. We'll work with upstream of the other affected packages to make sure the copies are refreshed. - coreutils-gnulib-tests-ppc64le.patch: Fix imported gnulib long double math tests for little-endian PowerPC. (forwarded request 211829 from uweigand) OBS-URL: https://build.opensuse.org/request/show/212043 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/coreutils?expand=0&rev=98
This commit is contained in:
parent
e5d73affc5
commit
0b65b8c39d
41
coreutils-gnulib-tests-ppc64le.patch
Normal file
41
coreutils-gnulib-tests-ppc64le.patch
Normal file
@ -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
|
@ -1498,7 +1498,7 @@ Index: src/join.c
|
||||
+ for (i = 0; i < 2; i++)
|
||||
+ {
|
||||
+ mallocd = 1;
|
||||
+ copy[i] = xmalloc (len[i] + 1);
|
||||
+ copy[i] = xcalloc (1, len[i] + 1);
|
||||
+
|
||||
+ for (j = 0; j < MIN (len[0], len[1]);)
|
||||
+ {
|
||||
@ -3902,7 +3902,7 @@ Index: src/uniq.c
|
||||
+
|
||||
+ for (i = 0; i < 2; i++)
|
||||
+ {
|
||||
+ copy[i] = xmalloc (len[i] + 1);
|
||||
+ copy[i] = xcalloc (1, len[i] + 1);
|
||||
+
|
||||
+ for (j = 0, chars = 0; j < len[i] && chars < check_chars; chars++)
|
||||
+ {
|
||||
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 19 23:37:39 UTC 2013 - uweigand@de.ibm.com
|
||||
|
||||
- coreutils-gnulib-tests-ppc64le.patch: Fix imported gnulib long double
|
||||
math tests for little-endian PowerPC.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 19 22:54:26 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
- Fix issue with binary input in non-C locale (rh#1036289)
|
||||
(coreutils-i18n.patch): Initialize memory for some edge cases
|
||||
in the i18n patch for uniq and join.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 11 20:22:47 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
|
@ -106,6 +106,9 @@ Patch200: coreutils-gnulib-tests-fix-nap-race.patch
|
||||
# a bit more to avoid failures on OBS.
|
||||
Patch201: coreutils-gnulib-tests-fix-nap-race-obs.patch
|
||||
|
||||
# Fix imported gnulib long double math tests for little-endian PowerPC
|
||||
Patch202: coreutils-gnulib-tests-ppc64le.patch
|
||||
|
||||
# ================================================
|
||||
%description
|
||||
These are the GNU core utilities. This package is the union of
|
||||
@ -136,6 +139,7 @@ the GNU fileutils, sh-utils, and textutils packages.
|
||||
|
||||
%patch200
|
||||
%patch201
|
||||
%patch202 -p1
|
||||
|
||||
xz -dc %{S:2} >po/de.po
|
||||
|
||||
|
@ -1,3 +1,16 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 19 23:37:39 UTC 2013 - uweigand@de.ibm.com
|
||||
|
||||
- coreutils-gnulib-tests-ppc64le.patch: Fix imported gnulib long double
|
||||
math tests for little-endian PowerPC.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 19 22:54:26 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
- Fix issue with binary input in non-C locale (rh#1036289)
|
||||
(coreutils-i18n.patch): Initialize memory for some edge cases
|
||||
in the i18n patch for uniq and join.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 11 20:22:47 UTC 2013 - mail@bernhard-voelker.de
|
||||
|
||||
|
@ -106,6 +106,9 @@ Patch200: coreutils-gnulib-tests-fix-nap-race.patch
|
||||
# a bit more to avoid failures on OBS.
|
||||
Patch201: coreutils-gnulib-tests-fix-nap-race-obs.patch
|
||||
|
||||
# Fix imported gnulib long double math tests for little-endian PowerPC
|
||||
Patch202: coreutils-gnulib-tests-ppc64le.patch
|
||||
|
||||
# ================================================
|
||||
%description
|
||||
These are the GNU core utilities. This package is the union of
|
||||
@ -136,6 +139,7 @@ the GNU fileutils, sh-utils, and textutils packages.
|
||||
|
||||
%patch200
|
||||
%patch201
|
||||
%patch202 -p1
|
||||
|
||||
xz -dc %{S:2} >po/de.po
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user