diff options
Diffstat (limited to 'math')
-rw-r--r-- | math/Versions | 3 | ||||
-rw-r--r-- | math/w_exp2f.c | 7 | ||||
-rw-r--r-- | math/w_exp2f_compat.c | 6 | ||||
-rw-r--r-- | math/w_expf.c | 7 | ||||
-rw-r--r-- | math/w_expf_compat.c | 7 |
5 files changed, 23 insertions, 7 deletions
diff --git a/math/Versions b/math/Versions index e409de0681..380f6a2a1a 100644 --- a/math/Versions +++ b/math/Versions @@ -229,4 +229,7 @@ libm { fromfp; fromfpf; fromfpl; ufromfp; ufromfpf; ufromfpl; fromfpx; fromfpxf; fromfpxl; ufromfpx; ufromfpxf; ufromfpxl; } + GLIBC_2.27 { + expf; exp2f; + } } diff --git a/math/w_exp2f.c b/math/w_exp2f.c new file mode 100644 index 0000000000..948d745dab --- /dev/null +++ b/math/w_exp2f.c @@ -0,0 +1,7 @@ +#include <math-type-macros-float.h> +#undef __USE_WRAPPER_TEMPLATE +#define __USE_WRAPPER_TEMPLATE 1 +#undef declare_mgen_alias +#define declare_mgen_alias(a, b) +#include <w_exp2_template.c> +versioned_symbol (libm, __exp2f, exp2f, GLIBC_2_27); diff --git a/math/w_exp2f_compat.c b/math/w_exp2f_compat.c index b058daed30..6ab6f6c6de 100644 --- a/math/w_exp2f_compat.c +++ b/math/w_exp2f_compat.c @@ -6,9 +6,9 @@ #include <math_private.h> #include <math-svid-compat.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_1, GLIBC_2_27) float -__exp2f (float x) +__exp2f_compat (float x) { float z = __ieee754_exp2f (x); if (__builtin_expect (!isfinite (z) || z == 0, 0) @@ -18,5 +18,5 @@ __exp2f (float x) return z; } -weak_alias (__exp2f, exp2f) +compat_symbol (libm, __exp2f_compat, exp2f, GLIBC_2_1); #endif diff --git a/math/w_expf.c b/math/w_expf.c new file mode 100644 index 0000000000..6d5f03c5f9 --- /dev/null +++ b/math/w_expf.c @@ -0,0 +1,7 @@ +#include <math-type-macros-float.h> +#undef __USE_WRAPPER_TEMPLATE +#define __USE_WRAPPER_TEMPLATE 1 +#undef declare_mgen_alias +#define declare_mgen_alias(a, b) +#include <w_exp_template.c> +versioned_symbol (libm, __expf, expf, GLIBC_2_27); diff --git a/math/w_expf_compat.c b/math/w_expf_compat.c index a38ff4082d..2512498bb3 100644 --- a/math/w_expf_compat.c +++ b/math/w_expf_compat.c @@ -20,10 +20,10 @@ #include <math_private.h> #include <math-svid-compat.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_27) /* wrapper expf */ float -__expf (float x) +__expf_compat (float x) { float z = __ieee754_expf (x); if (__builtin_expect (!isfinite (z) || z == 0, 0) @@ -32,6 +32,5 @@ __expf (float x) return z; } -hidden_def (__expf) -weak_alias (__expf, expf) +compat_symbol (libm, __expf_compat, expf, GLIBC_2_0); #endif |