Accepting request 211838 from devel:libraries:c_c++
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. - libunistring-gnulib-ppc64le.patch: Fix imported gnulib long double math tests for little-endian PowerPC. (forwarded request 211832 from uweigand) OBS-URL: https://build.opensuse.org/request/show/211838 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/libunistring?expand=0&rev=16
This commit is contained in:
commit
bcef4b1535
41
libunistring-gnulib-ppc64le.patch
Normal file
41
libunistring-gnulib-ppc64le.patch
Normal file
@ -0,0 +1,41 @@
|
||||
diff --git a/tests/test-isnanl.h b/tests/test-isnanl.h
|
||||
index 06e6a7c..2df10f8 100644
|
||||
--- a/tests/test-isnanl.h
|
||||
+++ b/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/tests/test-signbit.c b/tests/test-signbit.c
|
||||
index e8ea097..7e24292 100644
|
||||
--- a/tests/test-signbit.c
|
||||
+++ b/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
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed Dec 18 19:56:18 UTC 2013 - uweigand@de.ibm.com
|
||||
|
||||
- libunistring-gnulib-ppc64le.patch: Fix imported gnulib long double
|
||||
math tests for little-endian PowerPC.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Fri Mar 16 08:58:14 UTC 2012 - cfarrell@suse.com
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package libunistring
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -14,6 +14,8 @@
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
Name: libunistring
|
||||
%define lname libunistring0
|
||||
Version: 0.9.3
|
||||
@ -25,6 +27,9 @@ Url: http://www.gnu.org/software/libunistring/
|
||||
Source0: libunistring-%{version}.tar.bz2
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
# Fix imported gnulib long double math tests for little-endian PowerPC
|
||||
Patch1: libunistring-gnulib-ppc64le.patch
|
||||
|
||||
%description
|
||||
This portable C library implements Unicode string types in three flavours:
|
||||
(UTF-8, UTF-16, UTF-32), together with functions for character processing
|
||||
@ -59,6 +64,7 @@ case folding and regular expressions).
|
||||
|
||||
%prep
|
||||
%setup -q
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
%configure --disable-static --disable-rpath --docdir=%_docdir/%name
|
||||
|
Loading…
Reference in New Issue
Block a user