about summary refs log tree commit diff
path: root/math/w_exp2_compat.c
diff options
context:
space:
mode:
Diffstat (limited to 'math/w_exp2_compat.c')
-rw-r--r--math/w_exp2_compat.c20
1 files changed, 17 insertions, 3 deletions
diff --git a/math/w_exp2_compat.c b/math/w_exp2_compat.c
index 7ab618292f..567383d001 100644
--- a/math/w_exp2_compat.c
+++ b/math/w_exp2_compat.c
@@ -7,9 +7,11 @@
 #include <math-svid-compat.h>
 #include <libm-alias-double.h>
 
-#if LIBM_SVID_COMPAT
+#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_29) \
+			 || defined NO_LONG_DOUBLE \
+			 || defined LONG_DOUBLE_COMPAT)
 double
-__exp2 (double x)
+__exp2_compat (double x)
 {
   double z = __ieee754_exp2 (x);
   if (__builtin_expect (!isfinite (z) || z == 0, 0)
@@ -19,5 +21,17 @@ __exp2 (double x)
 
   return z;
 }
-libm_alias_double (__exp2, exp2)
+# if SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_29)
+compat_symbol (libm, __exp2_compat, exp2, GLIBC_2_1);
+# endif
+# ifdef NO_LONG_DOUBLE
+weak_alias (__exp2_compat, exp2l)
+# endif
+# ifdef LONG_DOUBLE_COMPAT
+/* Work around gas bug "multiple versions for symbol".  */
+weak_alias (__exp2_compat, __exp2_compat_alias)
+
+LONG_DOUBLE_COMPAT_CHOOSE_libm_exp2l (
+  compat_symbol (libm, __exp2_compat_alias, exp2l, FIRST_VERSION_libm_exp2l), );
+# endif
 #endif