diff options
author | Joseph Myers <joseph@codesourcery.com> | 2018-10-04 12:16:05 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2018-10-04 12:16:05 +0000 |
commit | a19876214aa9a82ab5fe3e94f6cd3ddad88f3abc (patch) | |
tree | b53b3f31874734ad740a2b5b4070d1a6da856ef8 /sysdeps/ieee754/ldbl-opt/Makefile | |
parent | e7624d708d12c608daf179d90c0d6de74c24dd2c (diff) | |
download | glibc-a19876214aa9a82ab5fe3e94f6cd3ddad88f3abc.zip glibc-a19876214aa9a82ab5fe3e94f6cd3ddad88f3abc.tar.gz glibc-a19876214aa9a82ab5fe3e94f6cd3ddad88f3abc.tar.bz2 |
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.
Diffstat (limited to 'sysdeps/ieee754/ldbl-opt/Makefile')
-rw-r--r-- | sysdeps/ieee754/ldbl-opt/Makefile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sysdeps/ieee754/ldbl-opt/Makefile b/sysdeps/ieee754/ldbl-opt/Makefile index ef790ad..6854413 100644 --- a/sysdeps/ieee754/ldbl-opt/Makefile +++ b/sysdeps/ieee754/ldbl-opt/Makefile @@ -172,7 +172,10 @@ CFLAGS-nldbl-y0.c = -fno-builtin-y0l CFLAGS-nldbl-y1.c = -fno-builtin-y1l CFLAGS-nldbl-yn.c = -fno-builtin-ynl -tests += test-narrow-macros-ldbl-64 +tests += test-narrow-macros-ldbl-64 test-nldbl-redirect CFLAGS-test-narrow-macros-ldbl-64.c += -mlong-double-64 +CFLAGS-test-nldbl-redirect.c += -mlong-double-64 + +$(objpfx)test-nldbl-redirect: $(objpfx)libnldbl_nonshared.a endif |