This is the mail archive of the mailing list for the glibc project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Extend powerpc-nofpu -fno-builtin-fabsl workaround to more files

For powerpc-nofpu, several libm files are built with
-fno-builtin-fabsl because of a GCC bug where a generic inline
expansion of fabsl, involving comparison with 0, is incorrect for -0.

The same GCC bug also affects quiet NaN arguments: by doing an ordered
comparison with 0, exceptions are raised (whereas fabsl maps to IEEE
754 abs, which should never raise exceptions even for signaling NaNs).
This is covered up by bug 14910, but becomes visible with my patch
<> to fix
that bug.  This patch extends the workaround to the extra files
needing it once that bug is fixed.

Tested for powerpc-nofpu.

2013-10-10  Joseph Myers  <>

	* sysdeps/powerpc/nofpu/Makefile [$(subdir) = math]
	(CFLAGS-e_hypotl.c): Add -fno-builtin-fabsl.
	[$(subdir) = math] (CFLAGS-w_acosl.c): Likewise.
	[$(subdir) = math] (CFLAGS-w_asinl.c): Likewise.
	[$(subdir) = math] (CFLAGS-w_atanhl.c): Likewise.
	[$(subdir) = math] (CFLAGS-w_j0l.c): Likewise.
	[$(subdir) = math] (CFLAGS-w_j1l.c): Likewise.

diff --git a/sysdeps/powerpc/nofpu/Makefile b/sysdeps/powerpc/nofpu/Makefile
index 6bdff45..b9cbf80 100644
--- a/sysdeps/powerpc/nofpu/Makefile
+++ b/sysdeps/powerpc/nofpu/Makefile
@@ -14,6 +14,7 @@ CPPFLAGS += -I../soft-fp/
 # gcc-4.1.1 and may be too late for gcc-4.2.  So we need these flags
 # until the fix in a gcc release and glibc drops support for earlier
 # versions of gcc.
+CFLAGS-e_hypotl.c += -fno-builtin-fabsl
 CFLAGS-e_powl.c += -fno-builtin-fabsl
 CFLAGS-s_ccoshl.c += -fno-builtin-fabsl
 CFLAGS-s_csinhl.c += -fno-builtin-fabsl
@@ -21,4 +22,9 @@ CFLAGS-s_clogl.c += -fno-builtin-fabsl
 CFLAGS-s_clog10l.c += -fno-builtin-fabsl
 CFLAGS-s_csinl.c += -fno-builtin-fabsl
 CFLAGS-s_csqrtl.c += -fno-builtin-fabsl
+CFLAGS-w_acosl.c += -fno-builtin-fabsl
+CFLAGS-w_asinl.c += -fno-builtin-fabsl
+CFLAGS-w_atanhl.c += -fno-builtin-fabsl
+CFLAGS-w_j0l.c += -fno-builtin-fabsl
+CFLAGS-w_j1l.c += -fno-builtin-fabsl

Joseph S. Myers

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]