hppa: Define __NO_LONG_DOUBLE_MATH so headers are consistent with libm build

Message ID 66B8E687-EF7F-43F2-85D0-FDF44B08CAE1@bell.net
State Committed
Headers

Commit Message

John David Anglin Nov. 22, 2015, 10:15 p.m. UTC
  The attached patch fixes BZ #19270 and the Debian gmt package know builds successfully.  Aside from the
comment, the define of __NO_LONG_DOUBLE_MATH is similar to that in the generic version of glibc.

Build tested on hppa-unknown-linux-gnu with no observed regressions.

Please commit if okay.

Dave Anglin
--
John David Anglin	dave.anglin@bell.net
2015-11-22  John David Anglin  <danglin@gcc.gnu.org>

	[BZ #19270]
	* sysdeps/hppa/fpu/bits/mathdef.h (__NO_LONG_DOUBLE_MATH): Define.
  

Comments

Mike Frysinger Dec. 29, 2015, 6:25 p.m. UTC | #1
On 22 Nov 2015 17:15, John David Anglin wrote:
> The attached patch fixes BZ #19270 and the Debian gmt package know builds successfully.  Aside from the
> comment, the define of __NO_LONG_DOUBLE_MATH is similar to that in the generic version of glibc.

thanks, pushed now
-mike
  

Patch

diff --git a/sysdeps/hppa/fpu/bits/mathdef.h b/sysdeps/hppa/fpu/bits/mathdef.h
index d189f4a..443655f 100644
--- a/sysdeps/hppa/fpu/bits/mathdef.h
+++ b/sysdeps/hppa/fpu/bits/mathdef.h
@@ -34,5 +34,10 @@  typedef double double_t;	/* `double' expressions are evaluated as
 
 #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