Message ID | 20241219202003.2651277-5-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 81f277472d..f6c7bd8d61 100644 --- a/math/Versions +++ b/math/Versions @@ -673,5 +673,6 @@ libm { # No SVID compatible error handling. log10f; lgammaf; lgammaf_r; + acosf; } } diff --git a/math/w_acosf.c b/math/w_acosf.c new file mode 100644 index 0000000000..637b52f624 --- /dev/null +++ b/math/w_acosf.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_acos_template.c> +versioned_symbol (libm, __acosf, acosf, GLIBC_2_41); +libm_alias_float_other (__acosf, acosf) diff --git a/math/w_acosf_compat.c b/math/w_acosf_compat.c index 60ad481fc7..34e355737f 100644 --- a/math/w_acosf_compat.c +++ b/math/w_acosf_compat.c @@ -22,10 +22,10 @@ #include <libm-alias-float.h> -#if LIBM_SVID_COMPAT +#if LIBM_SVID_COMPAT && SHLIB_COMPAT (libm, GLIBC_2_0, GLIBC_2_41) /* wrapper acosf */ float -__acosf (float x) +__acos_compatf (float x) { if (__builtin_expect (isgreater (fabsf (x), 1.0f), 0) && _LIB_VERSION != _IEEE_) @@ -37,5 +37,9 @@ __acosf (float x) return __ieee754_acosf (x); } -libm_alias_float (__acos, acos) +# ifdef NO_COMPAT_NEEDED +libm_alias_float (__acos_compat, acos) +# else +compat_symbol (libm, __acos_compatf, acosf, GLIBC_2_0); +# endif #endif diff --git a/sysdeps/ieee754/flt-32/e_acosf.c b/sysdeps/ieee754/flt-32/e_acosf.c index cba01221dc..c592c67d02 100644 --- a/sysdeps/ieee754/flt-32/e_acosf.c +++ b/sysdeps/ieee754/flt-32/e_acosf.c @@ -28,6 +28,8 @@ SOFTWARE. #include <math.h> #include <math_private.h> #include <libm-alias-finite.h> +#include <libm-alias-float.h> +#include <math-svid-compat.h> #include "math_config.h" static __attribute__ ((noinline)) float @@ -64,7 +66,7 @@ poly12 (double z, const double *c) } float -__ieee754_acosf (float x) +__acosf (float x) { const double pi2 = 0x1.921fb54442d18p+0; static const double o[] = { 0, 0x1.921fb54442d18p+1 }; @@ -136,4 +138,11 @@ __ieee754_acosf (float x) } return r; } +strong_alias (__acosf, __ieee754_acosf) +#if LIBM_SVID_COMPAT +versioned_symbol (libm, __acosf, acosf, GLIBC_2_41); +libm_alias_float_other (__acos, acos) +#else +libm_alias_float (__acos, acos) +#endif libm_alias_finite (__ieee754_acosf, __acosf) diff --git a/sysdeps/ieee754/flt-32/w_acosf.c b/sysdeps/ieee754/flt-32/w_acosf.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ieee754/flt-32/w_acosf.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/m680x0/fpu/w_acosf_compat.c b/sysdeps/m68k/m680x0/fpu/w_acosf_compat.c new file mode 100644 index 0000000000..c49aeb2e06 --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/w_acosf_compat.c @@ -0,0 +1,8 @@ +/* m68k provides an optimized __ieee754_acosf. */ +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include <math/w_acosf_compat.c> +#else +# include <math-type-macros-float.h> +# include <w_acos_template.c> +#endif diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index 19c5404622..a2ef2276c4 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1221,6 +1221,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/aarch64/libm.abilist b/sysdeps/unix/sysv/linux/aarch64/libm.abilist index 01fd052ad4..9beef4a25d 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libm.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libm.abilist @@ -1189,6 +1189,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/alpha/libm.abilist b/sysdeps/unix/sysv/linux/alpha/libm.abilist index 987b3e867d..17e08a05b1 100644 --- a/sysdeps/unix/sysv/linux/alpha/libm.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libm.abilist @@ -1348,6 +1348,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/arm/be/libm.abilist b/sysdeps/unix/sysv/linux/arm/be/libm.abilist index 555aa85754..f624edcbb7 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libm.abilist b/sysdeps/unix/sysv/linux/arm/le/libm.abilist index 555aa85754..f624edcbb7 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/hppa/libm.abilist b/sysdeps/unix/sysv/linux/hppa/libm.abilist index ebfeab6952..eecea6c987 100644 --- a/sysdeps/unix/sysv/linux/hppa/libm.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index 0881fb8acf..6b7f949e39 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1228,6 +1228,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist index 555aa85754..f624edcbb7 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist index 2ead389377..3ff01e0719 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist index 2ead389377..3ff01e0719 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist index 0d749f151c..fbf247121d 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist index 503f6c4716..e2311fb6db 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist @@ -1189,6 +1189,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist index 721baa844c..ea13cdb1a2 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist @@ -1025,6 +1025,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist index 84b817ead4..6148bc0bfb 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist @@ -1024,6 +1024,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist index 16ad95f05c..d7d5c59d9e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist @@ -1018,6 +1018,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist index 051e2bb763..72abf2ee3e 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist @@ -1373,6 +1373,7 @@ GLIBC_2.41 __atanpiieee128 F GLIBC_2.41 __cospiieee128 F GLIBC_2.41 __sinpiieee128 F GLIBC_2.41 __tanpiieee128 F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist index b460e7c560..d95426d3e9 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist @@ -1292,6 +1292,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist index 0f44c65cfa..0f66ff47a2 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist @@ -1292,6 +1292,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libm.abilist b/sysdeps/unix/sysv/linux/sh/be/libm.abilist index 450af3bfa0..9af3cd6248 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libm.abilist b/sysdeps/unix/sysv/linux/sh/le/libm.abilist index 450af3bfa0..9af3cd6248 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libm.abilist @@ -878,6 +878,7 @@ GLIBC_2.40 logp1f32 F GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif32 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist index bd0d980112..698e44db29 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist @@ -1299,6 +1299,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist index a1847fe909..4f9398182b 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist @@ -1189,6 +1189,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist index 22b87c7374..8316532d1b 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist @@ -1222,6 +1222,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist index 79194159c3..59d429f5be 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist @@ -1222,6 +1222,7 @@ GLIBC_2.40 logp1f32x F GLIBC_2.40 logp1f64 F GLIBC_2.40 logp1f64x F GLIBC_2.40 logp1l F +GLIBC_2.41 acosf F GLIBC_2.41 acospi F GLIBC_2.41 acospif F GLIBC_2.41 acospif128 F