Message ID | 20241219202003.2651277-3-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 e4fbef3f6d..b7cb4ba51d 100644 --- a/math/Versions +++ b/math/Versions @@ -670,5 +670,7 @@ libm { cospif64x; cospif128; sinpif64x; sinpif128; tanpif64x; tanpif128; + # No SVID compatible error handling. + log10f; } } diff --git a/math/w_log10f.c b/math/w_log10f.c new file mode 100644 index 0000000000..1b70eabcb0 --- /dev/null +++ b/math/w_log10f.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_log10_template.c> +versioned_symbol (libm, __log10f, log10f, GLIBC_2_41); +libm_alias_float_other (__log10f, log10f) diff --git a/math/w_log10f_compat.c b/math/w_log10f_compat.c index 4a84b40d54..aaa06f55bc 100644 --- a/math/w_log10f_compat.c +++ b/math/w_log10f_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 log10f(x) */ float -__log10f (float x) +__log10_compatf (float x) { if (__builtin_expect (islessequal (x, 0.0f), 0) && _LIB_VERSION != _IEEE_) { @@ -43,5 +43,9 @@ __log10f (float x) return __ieee754_log10f (x); } -libm_alias_float (__log10, log10) +# ifdef NO_COMPAT_NEEDED +libm_alias_float (__log10_compat, log10) +# else +compat_symbol (libm, __log10_compatf, log10f, GLIBC_2_0); +# endif #endif diff --git a/sysdeps/ieee754/flt-32/e_log10f.c b/sysdeps/ieee754/flt-32/e_log10f.c index 03d9e281f3..ca61a067ed 100644 --- a/sysdeps/ieee754/flt-32/e_log10f.c +++ b/sysdeps/ieee754/flt-32/e_log10f.c @@ -27,6 +27,8 @@ SOFTWARE. #include <math.h> #include <stdint.h> #include <libm-alias-finite.h> +#include <libm-alias-float.h> +#include <math-svid-compat.h> #include "math_config.h" static __attribute__ ((noinline)) float @@ -45,7 +47,7 @@ as_special (float x) } float -__ieee754_log10f (float x) +__log10f (float x) { static const double tr[] = { @@ -158,4 +160,11 @@ __ieee754_log10f (float x) } return ub; } +strong_alias (__log10f, __ieee754_log10f) +#if LIBM_SVID_COMPAT +versioned_symbol (libm, __log10f, log10f, GLIBC_2_41); +libm_alias_float_other (__log10, log10) +#else +libm_alias_float (__log10, log10) +#endif libm_alias_finite (__ieee754_log10f, __log10f) diff --git a/sysdeps/ieee754/flt-32/w_log10f.c b/sysdeps/ieee754/flt-32/w_log10f.c new file mode 100644 index 0000000000..1cc8931700 --- /dev/null +++ b/sysdeps/ieee754/flt-32/w_log10f.c @@ -0,0 +1 @@ +/* Not needed. */ diff --git a/sysdeps/m68k/m680x0/fpu/w_log10f_compat.c b/sysdeps/m68k/m680x0/fpu/w_log10f_compat.c new file mode 100644 index 0000000000..a0d6036fcc --- /dev/null +++ b/sysdeps/m68k/m680x0/fpu/w_log10f_compat.c @@ -0,0 +1,8 @@ +/* m68k provides an optimized __ieee754_log10f. */ +#ifdef SHARED +# define NO_COMPAT_NEEDED 1 +# include <math/w_log10f_compat.c> +#else +# include <math-type-macros-float.h> +# include <w_log10_template.c> +#endif diff --git a/sysdeps/mach/hurd/i386/libm.abilist b/sysdeps/mach/hurd/i386/libm.abilist index a248abb642..2c5340acb1 100644 --- a/sysdeps/mach/hurd/i386/libm.abilist +++ b/sysdeps/mach/hurd/i386/libm.abilist @@ -1261,6 +1261,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/aarch64/libm.abilist b/sysdeps/unix/sysv/linux/aarch64/libm.abilist index 88a81da2fe..cef9647f18 100644 --- a/sysdeps/unix/sysv/linux/aarch64/libm.abilist +++ b/sysdeps/unix/sysv/linux/aarch64/libm.abilist @@ -1229,6 +1229,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/alpha/libm.abilist b/sysdeps/unix/sysv/linux/alpha/libm.abilist index 007fd86f9e..cea5d26db0 100644 --- a/sysdeps/unix/sysv/linux/alpha/libm.abilist +++ b/sysdeps/unix/sysv/linux/alpha/libm.abilist @@ -1388,6 +1388,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/arm/be/libm.abilist b/sysdeps/unix/sysv/linux/arm/be/libm.abilist index d1531f79c9..0d772526d6 100644 --- a/sysdeps/unix/sysv/linux/arm/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/be/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/arm/le/libm.abilist b/sysdeps/unix/sysv/linux/arm/le/libm.abilist index d1531f79c9..0d772526d6 100644 --- a/sysdeps/unix/sysv/linux/arm/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/arm/le/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/hppa/libm.abilist b/sysdeps/unix/sysv/linux/hppa/libm.abilist index 4699d529a4..73638e858c 100644 --- a/sysdeps/unix/sysv/linux/hppa/libm.abilist +++ b/sysdeps/unix/sysv/linux/hppa/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/i386/libm.abilist b/sysdeps/unix/sysv/linux/i386/libm.abilist index d1ce0f7283..0be467f03e 100644 --- a/sysdeps/unix/sysv/linux/i386/libm.abilist +++ b/sysdeps/unix/sysv/linux/i386/libm.abilist @@ -1268,6 +1268,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist index d1531f79c9..0d772526d6 100644 --- a/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist +++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist index 2f6a2e7d21..ab41a60d17 100644 --- a/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/be/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist index 2f6a2e7d21..ab41a60d17 100644 --- a/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/microblaze/le/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist index 85173a7471..0e08dd4b0c 100644 --- a/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips32/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist index 880f8c4c16..52e719391a 100644 --- a/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist +++ b/sysdeps/unix/sysv/linux/mips/mips64/libm.abilist @@ -1229,6 +1229,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist index 43d578d09d..6ee447acd1 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libm.abilist @@ -1055,6 +1055,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist index 64a9ea10b2..00579cad3a 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libm.abilist @@ -1054,6 +1054,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist index d45783a1d3..cb5a390626 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/be/libm.abilist @@ -1048,6 +1048,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist index 44ca2f20d9..d87ea27219 100644 --- a/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc64/le/libm.abilist @@ -1413,6 +1413,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist index bc621c2923..604b5b3c43 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libm.abilist @@ -1332,6 +1332,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist index 8de3065e45..5a051fb088 100644 --- a/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist +++ b/sysdeps/unix/sysv/linux/s390/s390-64/libm.abilist @@ -1332,6 +1332,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/sh/be/libm.abilist b/sysdeps/unix/sysv/linux/sh/be/libm.abilist index 6df6a8d7b0..95b843407a 100644 --- a/sysdeps/unix/sysv/linux/sh/be/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/be/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/sh/le/libm.abilist b/sysdeps/unix/sysv/linux/sh/le/libm.abilist index 6df6a8d7b0..95b843407a 100644 --- a/sysdeps/unix/sysv/linux/sh/le/libm.abilist +++ b/sysdeps/unix/sysv/linux/sh/le/libm.abilist @@ -908,6 +908,7 @@ GLIBC_2.41 cospif32 F GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif32 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist index 991d96b3d4..94a44a5cd3 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libm.abilist @@ -1339,6 +1339,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist index 8600571387..492ea37070 100644 --- a/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist +++ b/sysdeps/unix/sysv/linux/sparc/sparc64/libm.abilist @@ -1229,6 +1229,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist index 8113fb41f0..0a8f74b516 100644 --- a/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/64/libm.abilist @@ -1262,6 +1262,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F diff --git a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist index ac96d62ed2..999c57b4b1 100644 --- a/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist +++ b/sysdeps/unix/sysv/linux/x86_64/x32/libm.abilist @@ -1262,6 +1262,7 @@ GLIBC_2.41 cospif32x F GLIBC_2.41 cospif64 F GLIBC_2.41 cospif64x F GLIBC_2.41 cospil F +GLIBC_2.41 log10f F GLIBC_2.41 sinpi F GLIBC_2.41 sinpif F GLIBC_2.41 sinpif128 F