diff options
author | Joseph Myers <joseph@codesourcery.com> | 2017-09-15 23:10:02 +0000 |
---|---|---|
committer | Joseph Myers <joseph@codesourcery.com> | 2017-09-15 23:10:02 +0000 |
commit | 9ac44708881c086f27f86b36c20749052d079c8f (patch) | |
tree | 70e2273135838595d52f2d367a777ab8a770380f /sysdeps/ieee754 | |
parent | c67a2328c88fec0e91c646ad4a9d9edfb7140f0a (diff) | |
download | glibc-9ac44708881c086f27f86b36c20749052d079c8f.tar glibc-9ac44708881c086f27f86b36c20749052d079c8f.tar.gz glibc-9ac44708881c086f27f86b36c20749052d079c8f.tar.bz2 glibc-9ac44708881c086f27f86b36c20749052d079c8f.zip |
Use libm_alias_double in math/.
This patch converts libm function implementations in math/ from using
weak_alias to using libm_alias_double to define public function names,
in cases where it would be appropriate to define _Float64 / _Float32x
aliases for those functions as well. This eliminates many
NO_LONG_DOUBLE conditionals and ldbl-opt wrappers round these function
implementations.
Tested for x86_64. Also tested with build-many-glibcs.py. Binary
differences seen are that the different order in which remainder and
drem symbols get defined as a result of this patch (the same source
file defines the same aliases, but in a different order of definition)
changes the order of symbols in the final libm.so when long double =
double, and for ldbl-opt configurations, the compat symbols for Bessel
functions were previously defined by e.g. "compat_symbol (libm, j0,
j0l, GLIBC_2_0)", which declares j0l as a compat symbol based on j0
and so makes j0l weak because j0 is weak, and are now defined
(indirectly via the relevant macros) based on e.g. __j0, so are no
longer weak because __j0 isn't weak.
* math/s_fma.c: Include <libm-alias-double.h>.
(fma): Define using libm_alias_double.
* math/s_nextafter.c: Include <libm-alias-double.h>.
(nextafter): Define using libm_alias_double.
* math/w_acos_compat.c: Include <libm-alias-double.h>.
(acos): Define using libm_alias_double.
* math/w_acosh_compat.c: Include <libm-alias-double.h>.
(aocsh): Define using libm_alias_double.
* math/w_asin_compat.c: Include <libm-alias-double.h>.
(asin): Define using libm_alias_double.
* math/w_atan2_compat.c: Include <libm-alias-double.h>.
(atan2): Define using libm_alias_double.
* math/w_atanh_compat.c: Include <libm-alias-double.h>.
(atanh): Define using libm_alias_double.
* math/w_cosh_compat.c: Include <libm-alias-double.h>.
(cosh): Define using libm_alias_double.
* math/w_exp10_compat.c: Include <libm-alias-double.h>.
(exp10): Define using libm_alias_double.
* math/w_exp2_compat.c: Include <libm-alias-double.h>.
(exp2): Define using libm_alias_double.
* math/w_exp_compat.c: Include <libm-alias-double.h>.
(exp): Define using libm_alias_double.
* math/w_fmod_compat.c: Include <libm-alias-double.h>.
(fmod): Define using libm_alias_double.
* math/w_hypot_compat.c: Include <libm-alias-double.h>.
(hypot): Define using libm_alias_double.
* math/w_j0_compat.c: Include <libm-alias-double.h>.
(j0): Define using libm_alias_double.
(y0): Likewise.
* math/w_j1_compat.c: Include <libm-alias-double.h>.
(j1): Define using libm_alias_double.
(y1): Likewise.
* math/w_jn_compat.c: Include <libm-alias-double.h>.
(jn): Define using libm_alias_double.
(yn): Likewise.
* math/w_log10_compat.c: Include <libm-alias-double.h>.
(log10): Define using libm_alias_double.
* math/w_log2_compat.c: Include <libm-alias-double.h>.
(log2): Define using libm_alias_double.
* math/w_log_compat.c: Include <libm-alias-double.h>.
(log): Define using libm_alias_double.
* math/w_pow_compat.c: Include <libm-alias-double.h>.
(pow): Define using libm_alias_double.
* math/w_remainder_compat.c: Include <libm-alias-double.h>.
(remainder): Define using libm_alias_double.
* math/w_sinh_compat.c: Include <libm-alias-double.h>.
(sinh): Define using libm_alias_double.
* math/w_sqrt_compat.c: Include <libm-alias-double.h>.
(sqrt): Define using libm_alias_double.
* math/w_tgamma_compat.c: Include <libm-alias-double.h>.
(tgamma): Define using libm_alias_double.
* sysdeps/ieee754/ldbl-opt/s_nextafter.c [LONG_DOUBLE_COMPAT(libm,
GLIBC_2_0)] (nextafterl): Do not define compat symbol here.
* sysdeps/ieee754/ldbl-opt/w_exp10_compat.c
[LONG_DOUBLE_COMPAT(libm, GLIBC_2_1)] (exp10l): Likewise.
* sysdeps/ieee754/ldbl-opt/w_remainder_compat.c
[LONG_DOUBLE_COMPAT(libm, GLIBC_2_0)] (remainderl): Likewise.
* sysdeps/ieee754/ldbl-opt/w_acos_compat.c: Remove.
* sysdeps/ieee754/ldbl-opt/w_acosh_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_asin_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_atan2_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_atanh_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_cosh_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_exp_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_fmod_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_hypot_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_j0_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_j1_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_jn_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_log10_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_log2_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_log_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_pow_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_sinh_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c: Likewise.
* sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c: Likewise.
Diffstat (limited to 'sysdeps/ieee754')
22 files changed, 0 insertions, 103 deletions
diff --git a/sysdeps/ieee754/ldbl-opt/s_nextafter.c b/sysdeps/ieee754/ldbl-opt/s_nextafter.c index 78e2c0ff37..e36ade8202 100644 --- a/sysdeps/ieee754/ldbl-opt/s_nextafter.c +++ b/sysdeps/ieee754/ldbl-opt/s_nextafter.c @@ -1,8 +1,5 @@ #include <math_ldbl_opt.h> #include <math/s_nextafter.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __nextafter, nextafterl, GLIBC_2_0); -#endif #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) strong_alias (__nextafter, __nexttowardd) strong_alias (__nextafter, __nexttowardld) diff --git a/sysdeps/ieee754/ldbl-opt/w_acos_compat.c b/sysdeps/ieee754/ldbl-opt/w_acos_compat.c deleted file mode 100644 index 1e6d1b37ec..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_acos_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_acos_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __acos, acosl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c b/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c deleted file mode 100644 index 40da339a7a..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_acosh_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_acosh_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __acosh, acoshl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_asin_compat.c b/sysdeps/ieee754/ldbl-opt/w_asin_compat.c deleted file mode 100644 index 1c52cc22ad..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_asin_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_asin_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __asin, asinl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c b/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c deleted file mode 100644 index d3f7964d7c..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_atan2_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_atan2_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __atan2, atan2l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c b/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c deleted file mode 100644 index e15ef1f93d..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_atanh_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_atanh_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __atanh, atanhl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c b/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c deleted file mode 100644 index af29735e10..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_cosh_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_cosh_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __cosh, coshl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c b/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c index eb132cfbe5..895411d1ee 100644 --- a/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_exp10_compat.c @@ -1,7 +1,6 @@ #include <math_ldbl_opt.h> #include <math/w_exp10_compat.c> #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __exp10, exp10l, GLIBC_2_1); # if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27) strong_alias (__pow10, __pow10_pow10l) compat_symbol (libm, __pow10_pow10l, pow10l, GLIBC_2_1); diff --git a/sysdeps/ieee754/ldbl-opt/w_exp_compat.c b/sysdeps/ieee754/ldbl-opt/w_exp_compat.c deleted file mode 100644 index d01fe655ff..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_exp_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_exp_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __exp, expl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c b/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c deleted file mode 100644 index 9280d39d70..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_fmod_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_fmod_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __fmod, fmodl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c b/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c deleted file mode 100644 index b3979ff0f4..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_hypot_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_hypot_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __hypot, hypotl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j0_compat.c b/sysdeps/ieee754/ldbl-opt/w_j0_compat.c deleted file mode 100644 index 45b4d14764..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_j0_compat.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_j0_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, j0, j0l, GLIBC_2_0); -compat_symbol (libm, y0, y0l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_j1_compat.c b/sysdeps/ieee754/ldbl-opt/w_j1_compat.c deleted file mode 100644 index 1071c8fd6a..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_j1_compat.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_j1_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, j1, j1l, GLIBC_2_0); -compat_symbol (libm, y1, y1l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_jn_compat.c b/sysdeps/ieee754/ldbl-opt/w_jn_compat.c deleted file mode 100644 index be29a36041..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_jn_compat.c +++ /dev/null @@ -1,6 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_jn_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, jn, jnl, GLIBC_2_0); -compat_symbol (libm, yn, ynl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log10_compat.c b/sysdeps/ieee754/ldbl-opt/w_log10_compat.c deleted file mode 100644 index 5ec6a2b2b6..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log10_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_log10_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __log10, log10l, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log2_compat.c b/sysdeps/ieee754/ldbl-opt/w_log2_compat.c deleted file mode 100644 index dffd2c183e..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log2_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_log2_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __log2, log2l, GLIBC_2_1); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_log_compat.c b/sysdeps/ieee754/ldbl-opt/w_log_compat.c deleted file mode 100644 index d2a2bcadde..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_log_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_log_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __log, logl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_pow_compat.c b/sysdeps/ieee754/ldbl-opt/w_pow_compat.c deleted file mode 100644 index c2a7942019..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_pow_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_pow_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __pow, powl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c b/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c index c823dcb8e7..8bdea32c02 100644 --- a/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c +++ b/sysdeps/ieee754/ldbl-opt/w_remainder_compat.c @@ -1,7 +1,6 @@ #include <math_ldbl_opt.h> #include <math/w_remainder_compat.c> #if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __remainder, remainderl, GLIBC_2_0); strong_alias (__remainder, __drem) compat_symbol (libm, __drem, dreml, GLIBC_2_0); #endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c b/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c deleted file mode 100644 index b47182c017..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_sinh_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_sinh_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sinh, sinhl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c b/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c deleted file mode 100644 index 355d1c20db..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_sqrt_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_0) -compat_symbol (libm, __sqrt, sqrtl, GLIBC_2_0); -#endif diff --git a/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c b/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c deleted file mode 100644 index 082ce8aaff..0000000000 --- a/sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c +++ /dev/null @@ -1,5 +0,0 @@ -#include <math_ldbl_opt.h> -#include <math/w_tgamma_compat.c> -#if LONG_DOUBLE_COMPAT(libm, GLIBC_2_1) -compat_symbol (libm, __tgamma, tgammal, GLIBC_2_1); -#endif |