Bug#805836: glibc: __NO_LONG_DOUBLE_MATH needs to be defined on hppa
Source: glibc
Version: 2.19-22
Severity: normal
Tags: patch
Dear Maintainer,
The attached fixes a problem found building the gmt package. See BZ 19270:
https://sourceware.org/bugzilla/show_bug.cgi?id=19270
Normally gcc optimizes the isnan macro so the __isnanl call is eliminated.
Thus the problem was hidden for some time.
As noted in the bug report, __NO_LONG_DOUBLE_MATH needs to be defined on hppa
to ensure consistency with the library build.
The attached patch has been submitted here:
https://sourceware.org/ml/libc-alpha/2015-11/msg00520.html
Please add this change to hppa patch set. It is now in 2.19-22+b6.
Regards,
Dave Anglin
-- System Information:
Debian Release: stretch/sid
APT prefers unreleased
APT policy: (500, 'unreleased'), (500, 'unstable')
Architecture: hppa (parisc64)
Kernel: Linux 3.18.24+ (SMP w/4 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8) (ignored: LC_ALL set to en_CA.utf8)
Shell: /bin/sh linked to /bin/dash
Init: sysvinit (via /sbin/init)
Index: glibc-2.19/ports/sysdeps/hppa/fpu/bits/mathdef.h
===================================================================
--- glibc-2.19.orig/ports/sysdeps/hppa/fpu/bits/mathdef.h
+++ glibc-2.19/ports/sysdeps/hppa/fpu/bits/mathdef.h
@@ -34,6 +34,10 @@ typedef double double_t; /* `double' exp
#endif /* ISO C99 */
-/* On hppa `long double' is 64-bits. */
-#undef __NO_LONG_DOUBLE_MATH
-
+#ifndef __NO_LONG_DOUBLE_MATH
+/* On hppa `long double' and `double' are 64-bits. So, libm is built
+ with NO_LONG_DOUBLE defined. The following define ensures the library
+ and headers are consistent. This disables the declaration of all the
+ `long double' function variants. */
+# define __NO_LONG_DOUBLE_MATH 1
+#endif
Reply to: