glibc/sysdeps/ieee754
Joseph Myers a19876214a Fix libnldbl_nonshared.a references to internal libm symbols (bug 23735).
The redirection of built-in functions such as sqrt in include/math.h
applies when the wrappers for those functions in libnldbl_nonshared.a
are built, resulting in references to internal names such as
__ieee754_sqrt that aren't actually exported from the shared libm.
(This applies for sqrt in 2.28, also for the round-to-integer
functions in current master because of my changes there.)  This patch
arranges for NO_MATH_REDIRECT to be used for all the affected
functions, and adds a test for those functions in
libnldbl_nonshared.a.

(We could of course choose to obsolete libnldbl_nonshared.a and
require that people building with -mlong-double-64 either include the
relevant headers and have a compiler supporting asm redirection, or
have some other means of achieving that redirection at compile time if
not including those headers.  But while we have libnldbl_nonshared.a,
it seems appropriate to fix such bugs in it.)

Tested for powerpc, and with build-many-glibcs.py.

	[BZ #23735]
	* sysdeps/ieee754/ldbl-opt/nldbl-compat.h (NO_MATH_REDIRECT):
	Define.
	* sysdeps/ieee754/ldbl-opt/test-nldbl-redirect.c: New file.
	* sysdeps/ieee754/ldbl-opt/Makefile [$(subdir) = math] (tests):
	Add test-nldbl-redirect.
	[$(subdir) = math] (CFLAGS-test-nldbl-redirect.c): New variable.
	[$(subdir) = math] ($(objpfx)test-nldbl-redirect): Depend on
	$(objpfx)libnldbl_nonshared.a.
2018-10-04 12:16:05 +00:00
..
dbl-64 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
float128 Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
flt-32 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-64-128 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-96 Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-128 Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
ldbl-128ibm Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
ldbl-128ibm-compat ldbl-128ibm-compat: Add printf_size 2018-07-02 10:51:01 -03:00
ldbl-opt Fix libnldbl_nonshared.a references to internal libm symbols (bug 23735). 2018-10-04 12:16:05 +00:00
soft-fp sysdeps/ieee754/soft-fp: ignore maybe-uninitialized with -O [BZ #19444] 2018-10-02 15:40:57 +00:00
Makefile Avoid -Wno-write-strings for k_standard.c. 2015-02-26 22:50:54 +00:00
ieee754.h Update copyright dates with scripts/update-copyrights. 2018-01-01 00:32:25 +00:00
k_standard.c Use copysign functions not __copysign functions in glibc libm. 2018-09-27 20:04:48 +00:00
k_standardf.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
k_standardl.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00
s_lib_version.c Simplify math-svid-compat code. 2017-08-28 15:19:52 +00:00
s_matherr.c Obsolete matherr, _LIB_VERSION, libieee.a. 2017-08-21 17:45:10 +00:00
s_signgam.c Remove unnecessary math_private.h includes. 2018-09-28 21:53:33 +00:00