From 4699cb8b5f25827eec50f071183a4abba04f16e5 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 3 Oct 2017 23:44:41 +0000 Subject: Use libm_alias_double for dbl-64 logb. This patch makes dbl-64 logb use libm_alias_double. Both the dbl-64 and dbl-64/wordsize-64 versions are changed, and the ldbl-opt version is removed. Because of multiarch wrappers, the changed implementations are made not to define aliases at all if __logb is defined as a macro, as with other functions, so avoiding duplicate compat symbols while allowing those wrappers to be simplified. Tested for x86_64, and verified with build-many-glibcs.py that installed stripped shared libraries are unchanged (except on alpha where changes from using the wordsize-64 version are expected). * sysdeps/ieee754/dbl-64/s_logb.c: Include . (logb): Define using libm_alias_double, only if [!__logb]. * sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c: Include . (logb): Define using libm_alias_double, only if [!__logb]. * sysdeps/ieee754/ldbl-opt/s_logb.c: Remove file. * sysdeps/powerpc/powerpc32/power4/fpu/multiarch/s_logb-ppc32.c (weak_alias): Do not undefine and redefine. (strong_alias): Likewise. * sysdeps/powerpc/powerpc64/fpu/multiarch/s_logb-ppc64.c (weak_alias): Likewise. (strong_alias): Likewise. --- sysdeps/ieee754/dbl-64/s_logb.c | 6 +++--- sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c | 7 +++---- sysdeps/ieee754/ldbl-opt/s_logb.c | 5 ----- 3 files changed, 6 insertions(+), 12 deletions(-) delete mode 100644 sysdeps/ieee754/ldbl-opt/s_logb.c (limited to 'sysdeps/ieee754') diff --git a/sysdeps/ieee754/dbl-64/s_logb.c b/sysdeps/ieee754/dbl-64/s_logb.c index 3a26b18f78..a6de1f6e49 100644 --- a/sysdeps/ieee754/dbl-64/s_logb.c +++ b/sysdeps/ieee754/dbl-64/s_logb.c @@ -18,6 +18,7 @@ #include #include +#include #include double @@ -46,7 +47,6 @@ __logb (double x) return 0.0; return (double) (rix - 1023); } -weak_alias (__logb, logb) -#ifdef NO_LONG_DOUBLE -strong_alias (__logb, __logbl) weak_alias (__logb, logbl) +#ifndef __logb +libm_alias_double (__logb, logb) #endif diff --git a/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c b/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c index c65cd52208..2dfec9a006 100644 --- a/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c +++ b/sysdeps/ieee754/dbl-64/wordsize-64/s_logb.c @@ -20,6 +20,7 @@ #include #include +#include double @@ -41,8 +42,6 @@ __logb (double x) } return (double) (ex - 1023); } -weak_alias (__logb, logb) -#ifdef NO_LONG_DOUBLE -strong_alias (__logb, __logbl) -weak_alias (__logb, logbl) +#ifndef __logb +libm_alias_double (__logb, logb) #endif diff --git a/sysdeps/ieee754/ldbl-opt/s_logb.c b/sysdeps/ieee754/ldbl-opt/s_logb.c deleted file mode 100644 index 4d7a6db275..0000000000 --- a/sysdeps/ieee754/ldbl-opt/s_logb.c +++ /dev/null @@ -1,5 +0,0 @@ -#include -#include -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __logb, logbl, GLIBC_2_0); -#endif -- cgit 1.4.1