aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2017-09-15 23:10:02 +0000
committerJoseph Myers <joseph@codesourcery.com>2017-09-15 23:10:02 +0000
commit9ac44708881c086f27f86b36c20749052d079c8f (patch)
tree70e2273135838595d52f2d367a777ab8a770380f
parentc67a2328c88fec0e91c646ad4a9d9edfb7140f0a (diff)
downloadglibc-9ac44708881c086f27f86b36c20749052d079c8f.zip
glibc-9ac44708881c086f27f86b36c20749052d079c8f.tar.gz
glibc-9ac44708881c086f27f86b36c20749052d079c8f.tar.bz2
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.
-rw-r--r--ChangeLog77
-rw-r--r--math/s_fma.c8
-rw-r--r--math/s_nextafter.c5
-rw-r--r--math/w_acos_compat.c7
-rw-r--r--math/w_acosh_compat.c7
-rw-r--r--math/w_asin_compat.c7
-rw-r--r--math/w_atan2_compat.c7
-rw-r--r--math/w_atanh_compat.c7
-rw-r--r--math/w_cosh_compat.c7
-rw-r--r--math/w_exp10_compat.c5
-rw-r--r--math/w_exp2_compat.c7
-rw-r--r--math/w_exp_compat.c7
-rw-r--r--math/w_fmod_compat.c7
-rw-r--r--math/w_hypot_compat.c7
-rw-r--r--math/w_j0_compat.c13
-rw-r--r--math/w_j1_compat.c13
-rw-r--r--math/w_jn_compat.c13
-rw-r--r--math/w_log10_compat.c7
-rw-r--r--math/w_log2_compat.c7
-rw-r--r--math/w_log_compat.c7
-rw-r--r--math/w_pow_compat.c7
-rw-r--r--math/w_remainder_compat.c5
-rw-r--r--math/w_sinh_compat.c7
-rw-r--r--math/w_sqrt_compat.c7
-rw-r--r--math/w_tgamma_compat.c7
-rw-r--r--sysdeps/ieee754/ldbl-opt/s_nextafter.c3
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_acos_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_acosh_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_asin_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_atan2_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_atanh_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_cosh_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_exp10_compat.c1
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_exp_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_fmod_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_hypot_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_j0_compat.c6
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_j1_compat.c6
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_jn_compat.c6
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_log10_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_log2_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_log_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_pow_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_remainder_compat.c1
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_sinh_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_sqrt_compat.c5
-rw-r--r--sysdeps/ieee754/ldbl-opt/w_tgamma_compat.c5
47 files changed, 128 insertions, 233 deletions
diff --git a/ChangeLog b/ChangeLog
index b9ce275..58acb54 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,82 @@
2017-09-15 Joseph Myers <joseph@codesourcery.com>
+ * 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.
+
* math/e_acoshl.c: Remove.
* math/e_acosl.c: Likewise.
* math/e_asinl.c: Likewise.
diff --git a/math/s_fma.c b/math/s_fma.c
index dc1cc65..929ca58 100644
--- a/math/s_fma.c
+++ b/math/s_fma.c
@@ -18,6 +18,7 @@
<http://www.gnu.org/licenses/>. */
#include <math.h>
+#include <libm-alias-double.h>
double
__fma (double x, double y, double z)
@@ -25,10 +26,5 @@ __fma (double x, double y, double z)
return (x * y) + z;
}
#ifndef __fma
-weak_alias (__fma, fma)
-#endif
-
-#ifdef NO_LONG_DOUBLE
-strong_alias (__fma, __fmal)
-weak_alias (__fmal, fmal)
+libm_alias_double (__fma, fma)
#endif
diff --git a/math/s_nextafter.c b/math/s_nextafter.c
index 72419cb..fbf440e 100644
--- a/math/s_nextafter.c
+++ b/math/s_nextafter.c
@@ -29,6 +29,7 @@ static char rcsid[] = "$NetBSD: s_nextafter.c,v 1.8 1995/05/10 20:47:58 jtc Exp
#include <math.h>
#include <math_private.h>
#include <float.h>
+#include <libm-alias-double.h>
double __nextafter(double x, double y)
{
@@ -83,10 +84,8 @@ double __nextafter(double x, double y)
INSERT_WORDS(x,hx,lx);
return x;
}
-weak_alias (__nextafter, nextafter)
+libm_alias_double (__nextafter, nextafter)
#ifdef NO_LONG_DOUBLE
-strong_alias (__nextafter, __nextafterl)
-weak_alias (__nextafter, nextafterl)
strong_alias (__nextafter, __nexttowardl)
weak_alias (__nexttowardl, nexttowardl)
#undef __nexttoward
diff --git a/math/w_acos_compat.c b/math/w_acos_compat.c
index 1930105..113e1d7 100644
--- a/math/w_acos_compat.c
+++ b/math/w_acos_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -37,9 +38,5 @@ __acos (double x)
return __ieee754_acos (x);
}
-weak_alias (__acos, acos)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__acos, __acosl)
-weak_alias (__acos, acosl)
-# endif
+libm_alias_double (__acos, acos)
#endif
diff --git a/math/w_acosh_compat.c b/math/w_acosh_compat.c
index f6d298e..882537a 100644
--- a/math/w_acosh_compat.c
+++ b/math/w_acosh_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -32,9 +33,5 @@ __acosh (double x)
return __ieee754_acosh (x);
}
-weak_alias (__acosh, acosh)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__acosh, __acoshl)
-weak_alias (__acosh, acoshl)
-# endif
+libm_alias_double (__acosh, acosh)
#endif
diff --git a/math/w_asin_compat.c b/math/w_asin_compat.c
index 7780f85..0c19564 100644
--- a/math/w_asin_compat.c
+++ b/math/w_asin_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -37,9 +38,5 @@ __asin (double x)
return __ieee754_asin (x);
}
-weak_alias (__asin, asin)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__asin, __asinl)
-weak_alias (__asin, asinl)
-# endif
+libm_alias_double (__asin, asin)
#endif
diff --git a/math/w_atan2_compat.c b/math/w_atan2_compat.c
index 1ca3349..8162e7b 100644
--- a/math/w_atan2_compat.c
+++ b/math/w_atan2_compat.c
@@ -24,6 +24,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -40,9 +41,5 @@ __atan2 (double y, double x)
__set_errno (ERANGE);
return z;
}
-weak_alias (__atan2, atan2)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__atan2, __atan2l)
-weak_alias (__atan2, atan2l)
-# endif
+libm_alias_double (__atan2, atan2)
#endif
diff --git a/math/w_atanh_compat.c b/math/w_atanh_compat.c
index c2cbb2e..4b29a66 100644
--- a/math/w_atanh_compat.c
+++ b/math/w_atanh_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -35,9 +36,5 @@ __atanh (double x)
return __ieee754_atanh (x);
}
-weak_alias (__atanh, atanh)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__atanh, __atanhl)
-weak_alias (__atanh, atanhl)
-# endif
+libm_alias_double (__atanh, atanh)
#endif
diff --git a/math/w_cosh_compat.c b/math/w_cosh_compat.c
index d0cb6b1..6941807 100644
--- a/math/w_cosh_compat.c
+++ b/math/w_cosh_compat.c
@@ -17,6 +17,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
double
@@ -29,9 +30,5 @@ __cosh (double x)
return z;
}
-weak_alias (__cosh, cosh)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__cosh, __coshl)
-weak_alias (__cosh, coshl)
-# endif
+libm_alias_double (__cosh, cosh)
#endif
diff --git a/math/w_exp10_compat.c b/math/w_exp10_compat.c
index 42dc312..a91b98f 100644
--- a/math/w_exp10_compat.c
+++ b/math/w_exp10_compat.c
@@ -24,6 +24,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
double
@@ -37,14 +38,12 @@ __exp10 (double x)
return z;
}
-weak_alias (__exp10, exp10)
+libm_alias_double (__exp10, exp10)
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
strong_alias (__exp10, __pow10)
compat_symbol (libm, __pow10, pow10, GLIBC_2_1);
# endif
# ifdef NO_LONG_DOUBLE
-strong_alias (__exp10, __exp10l)
-weak_alias (__exp10, exp10l)
# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27)
strong_alias (__exp10l, __pow10l)
compat_symbol (libm, __pow10l, pow10l, GLIBC_2_1);
diff --git a/math/w_exp2_compat.c b/math/w_exp2_compat.c
index 5739547..7ab6182 100644
--- a/math/w_exp2_compat.c
+++ b/math/w_exp2_compat.c
@@ -5,6 +5,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
double
@@ -18,9 +19,5 @@ __exp2 (double x)
return z;
}
-weak_alias (__exp2, exp2)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__exp2, __exp2l)
-weak_alias (__exp2, exp2l)
-# endif
+libm_alias_double (__exp2, exp2)
#endif
diff --git a/math/w_exp_compat.c b/math/w_exp_compat.c
index 98aa5b7..d5666b7 100644
--- a/math/w_exp_compat.c
+++ b/math/w_exp_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
/* wrapper exp */
@@ -33,9 +34,5 @@ __exp (double x)
return z;
}
hidden_def (__exp)
-weak_alias (__exp, exp)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__exp, __expl)
-weak_alias (__exp, expl)
-# endif
+libm_alias_double (__exp, exp)
#endif
diff --git a/math/w_fmod_compat.c b/math/w_fmod_compat.c
index f75b861..a4d2ebe 100644
--- a/math/w_fmod_compat.c
+++ b/math/w_fmod_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
/* wrapper fmod */
@@ -32,9 +33,5 @@ __fmod (double x, double y)
return __ieee754_fmod (x, y);
}
-weak_alias (__fmod, fmod)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__fmod, __fmodl)
-weak_alias (__fmod, fmodl)
-# endif
+libm_alias_double (__fmod, fmod)
#endif
diff --git a/math/w_hypot_compat.c b/math/w_hypot_compat.c
index 21c7e65..f07039c 100644
--- a/math/w_hypot_compat.c
+++ b/math/w_hypot_compat.c
@@ -17,6 +17,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -30,9 +31,5 @@ __hypot (double x, double y)
return z;
}
-weak_alias (__hypot, hypot)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__hypot, __hypotl)
-weak_alias (__hypot, hypotl)
-# endif
+libm_alias_double (__hypot, hypot)
#endif
diff --git a/math/w_j0_compat.c b/math/w_j0_compat.c
index b08688e..03f0d8e 100644
--- a/math/w_j0_compat.c
+++ b/math/w_j0_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -34,11 +35,7 @@ __j0 (double x)
return __ieee754_j0 (x);
}
-weak_alias (__j0, j0)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__j0, __j0l)
-weak_alias (__j0, j0l)
-# endif
+libm_alias_double (__j0, j0)
/* wrapper y0 */
@@ -67,9 +64,5 @@ __y0 (double x)
return __ieee754_y0 (x);
}
-weak_alias (__y0, y0)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__y0, __y0l)
-weak_alias (__y0, y0l)
-# endif
+libm_alias_double (__y0, y0)
#endif
diff --git a/math/w_j1_compat.c b/math/w_j1_compat.c
index bf0922d..4f99ad1 100644
--- a/math/w_j1_compat.c
+++ b/math/w_j1_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -34,11 +35,7 @@ __j1 (double x)
return __ieee754_j1 (x);
}
-weak_alias (__j1, j1)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__j1, __j1l)
-weak_alias (__j1, j1l)
-# endif
+libm_alias_double (__j1, j1)
/* wrapper y1 */
@@ -67,9 +64,5 @@ __y1 (double x)
return __ieee754_y1 (x);
}
-weak_alias (__y1, y1)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__y1, __y1l)
-weak_alias (__y1, y1l)
-# endif
+libm_alias_double (__y1, y1)
#endif
diff --git a/math/w_jn_compat.c b/math/w_jn_compat.c
index 955996a..767d904 100644
--- a/math/w_jn_compat.c
+++ b/math/w_jn_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -34,11 +35,7 @@ __jn (int n, double x)
return __ieee754_jn (n, x);
}
-weak_alias (__jn, jn)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__jn, __jnl)
-weak_alias (__jn, jnl)
-# endif
+libm_alias_double (__jn, jn)
/* wrapper yn */
@@ -67,9 +64,5 @@ __yn (int n, double x)
return __ieee754_yn (n, x);
}
-weak_alias (__yn, yn)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__yn, __ynl)
-weak_alias (__yn, ynl)
-# endif
+libm_alias_double (__yn, yn)
#endif
diff --git a/math/w_log10_compat.c b/math/w_log10_compat.c
index b8247aa..edfbe8b 100644
--- a/math/w_log10_compat.c
+++ b/math/w_log10_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -43,9 +44,5 @@ __log10 (double x)
return __ieee754_log10 (x);
}
-weak_alias (__log10, log10)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__log10, __log10l)
-weak_alias (__log10, log10l)
-# endif
+libm_alias_double (__log10, log10)
#endif
diff --git a/math/w_log2_compat.c b/math/w_log2_compat.c
index 6d1f9f2..ed70768 100644
--- a/math/w_log2_compat.c
+++ b/math/w_log2_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -43,9 +44,5 @@ __log2 (double x)
return __ieee754_log2 (x);
}
-weak_alias (__log2, log2)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__log2, __log2l)
-weak_alias (__log2, log2l)
-# endif
+libm_alias_double (__log2, log2)
#endif
diff --git a/math/w_log_compat.c b/math/w_log_compat.c
index 80750b4..66cce2d 100644
--- a/math/w_log_compat.c
+++ b/math/w_log_compat.c
@@ -20,6 +20,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -43,9 +44,5 @@ __log (double x)
return __ieee754_log (x);
}
-weak_alias (__log, log)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__log, __logl)
-weak_alias (__log, logl)
-# endif
+libm_alias_double (__log, log)
#endif
diff --git a/math/w_pow_compat.c b/math/w_pow_compat.c
index 4865f4d..929de92 100644
--- a/math/w_pow_compat.c
+++ b/math/w_pow_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -59,9 +60,5 @@ __pow (double x, double y)
return z;
}
-weak_alias (__pow, pow)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__pow, __powl)
-weak_alias (__pow, powl)
-# endif
+libm_alias_double (__pow, pow)
#endif
diff --git a/math/w_remainder_compat.c b/math/w_remainder_compat.c
index 68e322e..2b7f862 100644
--- a/math/w_remainder_compat.c
+++ b/math/w_remainder_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -33,11 +34,9 @@ __remainder (double x, double y)
return __ieee754_remainder (x, y);
}
-weak_alias (__remainder, remainder)
+libm_alias_double (__remainder, remainder)
weak_alias (__remainder, drem)
# ifdef NO_LONG_DOUBLE
-strong_alias (__remainder, __remainderl)
-weak_alias (__remainder, remainderl)
weak_alias (__remainder, dreml)
# endif
#endif
diff --git a/math/w_sinh_compat.c b/math/w_sinh_compat.c
index e5c3724..e964614 100644
--- a/math/w_sinh_compat.c
+++ b/math/w_sinh_compat.c
@@ -17,6 +17,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
double
@@ -29,9 +30,5 @@ __sinh (double x)
return z;
}
-weak_alias (__sinh, sinh)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__sinh, __sinhl)
-weak_alias (__sinh, sinhl)
-# endif
+libm_alias_double (__sinh, sinh)
#endif
diff --git a/math/w_sqrt_compat.c b/math/w_sqrt_compat.c
index aeead2e..3280d2f 100644
--- a/math/w_sqrt_compat.c
+++ b/math/w_sqrt_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
@@ -31,9 +32,5 @@ __sqrt (double x)
return __ieee754_sqrt (x);
}
-weak_alias (__sqrt, sqrt)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__sqrt, __sqrtl)
-weak_alias (__sqrt, sqrtl)
-# endif
+libm_alias_double (__sqrt, sqrt)
#endif
diff --git a/math/w_tgamma_compat.c b/math/w_tgamma_compat.c
index f843475..219aa10 100644
--- a/math/w_tgamma_compat.c
+++ b/math/w_tgamma_compat.c
@@ -19,6 +19,7 @@
#include <math.h>
#include <math_private.h>
#include <math-svid-compat.h>
+#include <libm-alias-double.h>
#if LIBM_SVID_COMPAT
double
@@ -41,9 +42,5 @@ __tgamma(double x)
}
return local_signgam < 0 ? -y : y;
}
-weak_alias (__tgamma, tgamma)
-# ifdef NO_LONG_DOUBLE
-strong_alias (__tgamma, __tgammal)
-weak_alias (__tgamma, tgammal)
-# endif
+libm_alias_double (__tgamma, tgamma)
#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_nextafter.c b/sysdeps/ieee754/ldbl-opt/s_nextafter.c
index 78e2c0f..e36ade8 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 1e6d1b3..0000000
--- 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 40da339..0000000
--- 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 1c52cc2..0000000
--- 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 d3f7964..0000000
--- 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 e15ef1f..0000000
--- 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 af29735..0000000
--- 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 eb132cf..895411d 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 d01fe65..0000000
--- 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 9280d39..0000000
--- 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 b3979ff..0000000
--- 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 45b4d14..0000000
--- 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 1071c8f..0000000
--- 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 be29a36..0000000
--- 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 5ec6a2b..0000000
--- 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 dffd2c1..0000000
--- 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 d2a2bca..0000000
--- 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 c2a7942..0000000
--- 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 c823dcb..8bdea32 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 b47182c..0000000
--- 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 355d1c2..0000000
--- 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 082ce8a..0000000
--- 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