Message ID | 20241219202003.2651277-10-adhemerval.zanella@linaro.org |
---|---|
State | New |
Headers | show |
Series | Remove the SVID wrapper from CORE-MATH functions. | expand |
diff --git a/math/Versions b/math/Versions index eec40df280..056fc19634 100644 --- a/math/Versions +++ b/math/Versions @@ -678,5 +678,6 @@ libm { acoshf; atan2f; atanhf; + coshf; } } diff --git a/math/w_coshf.c b/math/w_coshf.c new file mode 100644 index 0000000000..1a90c234ff --- /dev/null +++ b/math/w_coshf.c @@ -0,0 +1,8 @@ +#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_cosh_template.c> +versioned_symbol (libm, __coshf, coshf, GLIBC_2_41); +libm_alias_float_other (__coshf, coshf) diff --git a/math/w_coshf_compat.c b/math/w_coshf_compat.c index ce5e196c07..72f6c1de84 100644 --- a/math/w_coshf_compat.c +++ b/math/w_coshf_compat.c @@ -20,10 +20,11 @@ #include <math_private.h> #include <math-svid-compat.h> #include <libm-alias-float.h> +#include <shlib-compat.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_41) float -__coshf (float x) +__cosh_compatf (float x) { float z = __ieee754_coshf (x); if (__builtin_expect (!isfinite (z), 0) && isfinite (x) @@ -32,5 +33,10 @@ __coshf (float x) return z; } -libm_alias_float (__cosh, cosh) +# ifdef NO_COMPAT_NEEDED +strong_alias (__cosh_compatf, __coshf) +libm_alias_float (__cosh_compat, cosh) +# else +compat_symbol (libm, __cosh_compatf, coshf, GLIBC_2_0); +# endif #endif diff --git a/sysdeps/ieee754/flt-32/e_coshf.c b/sysdeps/ieee754/flt-32/e_coshf.c index 602d2b413f..0f8b5b60fe 100644 --- a/sysdeps/ieee754/flt-32/e_coshf.c +++ b/sysdeps/ieee754/flt-32/e_coshf.c @@ -27,10 +27,12 @@ SOFTWARE. #include <stdint.h> #include <math.h> #include <libm-alias-finite.h> +#include <libm-alias-float.h> +#include <math-svid-compat.h> #include "math_config.h" float -__ieee754_coshf (float x) +__coshf (float x) { static const double c[] = { @@ -114,4 +116,11 @@ __ieee754_coshf (float x) } return ub; } +strong_alias (__coshf, __ieee754_coshf) +#if LIBM_SVID_COMPAT +versioned_symbol (libm, __coshf, coshf, GLIBC_2_41); +libm_alias_float_other (__cosh, cosh) +#else +libm_alias_float (__cosh, cosh) +#endif libm_alias_finite (__ieee754_coshf, __coshf) diff --git a/sysdeps/ieee754/flt-32/w_coshf.c b/sysdeps/ieee754/flt-32/w_coshf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ieee754/flt-32/w_coshf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/m680x0/fpu/w_coshf_compat.c b/sysdeps/m68k/m680x0/fpu/w_coshf_compat.c new file mode 100644 index 0000000000..14444a9f0c --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/w_coshf_compat.c @@ -0,0 +1,8 @@ +/* m68k provides an optimized __ieee754_coshhf. */ +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include <math/w_coshf_compat.c> +#else +# include <math-type-macros-float.h> +# include <w_cosh_template.c> +#endif diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 8a677586a4..65a28fea55 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1258,6 +1258,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/aarch64/libm.abilist b/sysdeps/unix/sysv/linux/aarch64/libm.abilist index a24d8d7cc0..cd233f1f14 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libm.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libm.abilist @@ -1226,6 +1226,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/alpha/libm.abilist b/sysdeps/unix/sysv/linux/alpha/libm.abilist index 75e23816fb..9447358ece 100644 --- a/sysdeps/unix/sysv/linux/alpha/libm.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libm.abilist @@ -1385,6 +1385,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/arm/be/libm.abilist b/sysdeps/unix/sysv/linux/arm/be/libm.abilist index a17def2e99..31ec45ce5f 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libm.abilist b/sysdeps/unix/sysv/linux/arm/le/libm.abilist index a17def2e99..31ec45ce5f 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/hppa/libm.abilist b/sysdeps/unix/sysv/linux/hppa/libm.abilist index 3a1a59941b..0c099cf351 100644 --- a/sysdeps/unix/sysv/linux/hppa/libm.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 258ac73394..7caa63a837 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1265,6 +1265,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist index a17def2e99..31ec45ce5f 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist index 25c8973206..a8992cc5ed 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist index 25c8973206..a8992cc5ed 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist index 17e652a194..087faf1860 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist index 96fd6402a1..b6f6a024ce 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist @@ -1226,6 +1226,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist index 67a2149329..bb30867687 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist @@ -1054,6 +1054,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist index 7e208298a8..1ab0727602 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist @@ -1053,6 +1053,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist index e2398bbaf2..9ff3aeb577 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist @@ -1047,6 +1047,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist index f79497406e..664416d9c1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist @@ -1410,6 +1410,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist index cd0a0aaf74..f1c7ccbcc1 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist @@ -1329,6 +1329,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist index c942a3feb3..fb3a37fef4 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist @@ -1329,6 +1329,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libm.abilist b/sysdeps/unix/sysv/linux/sh/be/libm.abilist index 63df58337b..cf6351a5e0 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libm.abilist b/sysdeps/unix/sysv/linux/sh/le/libm.abilist index 63df58337b..cf6351a5e0 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libm.abilist @@ -907,6 +907,7 @@ GLIBC_2.41 atanpif32 F GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif32 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist index 7c5b14aac8..c0b1c5af7f 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist @@ -1336,6 +1336,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist index ea6cb72a4f..6bb1b6e27f 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist @@ -1226,6 +1226,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist index afba1055e8..c39d4ae4a3 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist @@ -1259,6 +1259,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist index 5164a53b43..d7e991a8b6 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist @@ -1259,6 +1259,7 @@ GLIBC_2.41 atanpif32x F GLIBC_2.41 atanpif64 F GLIBC_2.41 atanpif64x F GLIBC_2.41 atanpil F +GLIBC_2.41 coshf F GLIBC_2.41 cospi F GLIBC_2.41 cospif F GLIBC_2.41 cospif128 F