diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/Versions | 2 | ||||
-rw-r--r-- | math/w_pow.c | 8 | ||||
-rw-r--r-- | math/w_pow_compat.c | 20 |
3 files changed, 26 insertions, 4 deletions
diff --git a/math/Versions b/math/Versions index a887602..f1ab297 100644 --- a/math/Versions +++ b/math/Versions @@ -577,6 +577,6 @@ libm { } GLIBC_2.29 { # No SVID compatible error handling. - exp; exp2; log; log2; + exp; exp2; log; log2; pow; } } diff --git a/math/w_pow.c b/math/w_pow.c new file mode 100644 index 0000000..a66fd39 --- /dev/null +++ b/math/w_pow.c @@ -0,0 +1,8 @@ +#include <math-type-macros-double.h> +#undef __USE_WRAPPER_TEMPLATE +#define __USE_WRAPPER_TEMPLATE 1 +#undef declare_mgen_alias +#define declare_mgen_alias(a, b) +#include <w_pow_template.c> +versioned_symbol (libm, __pow, pow, GLIBC_2_29); +libm_alias_double_other (__pow, pow) diff --git a/math/w_pow_compat.c b/math/w_pow_compat.c index 815c679..eadf9b0 100644 --- a/math/w_pow_compat.c +++ b/math/w_pow_compat.c @@ -22,10 +22,12 @@ #include <libm-alias-double.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && (SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_29) \ + || defined NO_LONG_DOUBLE \ + || defined LONG_DOUBLE_COMPAT) /* wrapper pow */ double -__pow (double x, double y) +__pow_compat (double x, double y) { double z = __ieee754_pow (x, y); if (__glibc_unlikely (!isfinite (z))) @@ -60,5 +62,17 @@ __pow (double x, double y) return z; } -libm_alias_double (__pow, pow) +# if SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_29) +compat_symbol (libm, __pow_compat, pow, GLIBC_2_0); +# endif +# ifdef NO_LONG_DOUBLE +weak_alias (__pow_compat, powl) +# endif +# ifdef LONG_DOUBLE_COMPAT +/* Work around gas bug "multiple versions for symbol". */ +weak_alias (__pow_compat, __pow_compat_alias) + +LONG_DOUBLE_COMPAT_CHOOSE_libm_powl ( + compat_symbol (libm, __pow_compat_alias, powl, FIRST_VERSION_libm_powl), ); +# endif #endif |