diff options
Diffstat (limited to 'libc/ports/sysdeps/alpha')
-rw-r--r-- | libc/ports/sysdeps/alpha/Versions | 4 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S | 9 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S | 9 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/dl-procinfo.h | 2 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/fpu/e_sqrt.c | 22 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/fpu/e_sqrtf.c | 14 | ||||
-rw-r--r-- | libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c | 10 |
7 files changed, 69 insertions, 1 deletions
diff --git a/libc/ports/sysdeps/alpha/Versions b/libc/ports/sysdeps/alpha/Versions index 76b67a6b9..ae8fde7b2 100644 --- a/libc/ports/sysdeps/alpha/Versions +++ b/libc/ports/sysdeps/alpha/Versions @@ -10,4 +10,8 @@ libm { # used in inline functions. __atan2; } + GLIBC_2.18 { + # forgotten when the symbols were added to glibc 2.15 for other targets + __sqrt_finite; __sqrtf_finite; __sqrtl_finite; + } } diff --git a/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S b/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S index 66be65e51..2aac3d328 100644 --- a/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S +++ b/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrt.S @@ -16,6 +16,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <shlib-compat.h> .arch ev6 .set noreorder @@ -42,3 +43,11 @@ ENTRY(__ieee754_sqrt) nop END(__ieee754_sqrt) + +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +strong_alias(__ieee754_sqrt, __sqrt_finite1) +compat_symbol(libm, __sqrt_finite1, __sqrt_finite, GLIBC_2_15) +versioned_symbol(libm, __ieee754_sqrt, __sqrt_finite, GLIBC_2_18) +#else +strong_alias(__ieee754_sqrt, __sqrt_finite) +#endif diff --git a/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S b/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S index ad89786f2..5aeafca9a 100644 --- a/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S +++ b/libc/ports/sysdeps/alpha/alphaev6/fpu/e_sqrtf.S @@ -16,6 +16,7 @@ <http://www.gnu.org/licenses/>. */ #include <sysdep.h> +#include <shlib-compat.h> .arch ev6 .set noreorder @@ -42,3 +43,11 @@ ENTRY(__ieee754_sqrtf) nop END(__ieee754_sqrtf) + +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +strong_alias(__ieee754_sqrtf, __sqrtf_finite1) +compat_symbol(libm, __sqrtf_finite1, __sqrtf_finite, GLIBC_2_15) +versioned_symbol(libm, __ieee754_sqrtf, __sqrtf_finite, GLIBC_2_18) +#else +strong_alias(__ieee754_sqrtf, __sqrtf_finite) +#endif diff --git a/libc/ports/sysdeps/alpha/dl-procinfo.h b/libc/ports/sysdeps/alpha/dl-procinfo.h index 523d96676..0344dbc96 100644 --- a/libc/ports/sysdeps/alpha/dl-procinfo.h +++ b/libc/ports/sysdeps/alpha/dl-procinfo.h @@ -51,7 +51,7 @@ _dl_string_platform (const char *str) }; /* We cannot provide a general printing function. */ -#define _dl_procinfo(word) -1 +#define _dl_procinfo(type, word) -1 /* There are no hardware capabilities defined. */ #define _dl_hwcap_string(idx) "" diff --git a/libc/ports/sysdeps/alpha/fpu/e_sqrt.c b/libc/ports/sysdeps/alpha/fpu/e_sqrt.c index 538ff1da6..6abca0896 100644 --- a/libc/ports/sysdeps/alpha/fpu/e_sqrt.c +++ b/libc/ports/sysdeps/alpha/fpu/e_sqrt.c @@ -18,6 +18,7 @@ #include <math.h> #include <math_private.h> +#include <shlib-compat.h> #if !defined(_IEEE_FP_INEXACT) @@ -157,9 +158,30 @@ $fixup: \n\ \n\ .end __ieee754_sqrt"); +/* Avoid the __sqrt_finite alias that dbl-64/e_sqrt.c would give... */ +#undef strong_alias +#define strong_alias(a,b) + +/* ... defining our own. */ +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +asm (".global __sqrt_finite1; __sqrt_finite1 = __ieee754_sqrt"); +#else +asm (".global __sqrt_finite; __sqrt_finite = __ieee754_sqrt"); +#endif + static double __full_ieee754_sqrt(double) __attribute_used__; #define __ieee754_sqrt __full_ieee754_sqrt +#elif SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +# define __sqrt_finite __sqrt_finite1 #endif /* _IEEE_FP_INEXACT */ #include <sysdeps/ieee754/dbl-64/e_sqrt.c> + +/* Work around forgotten symbol in alphaev6 build. */ +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +# undef __sqrt_finite +# undef __ieee754_sqrt +compat_symbol (libm, __sqrt_finite1, __sqrt_finite, GLIBC_2_15); +versioned_symbol (libm, __ieee754_sqrt, __sqrt_finite, GLIBC_2_18); +#endif diff --git a/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c b/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c new file mode 100644 index 000000000..ad523f5cf --- /dev/null +++ b/libc/ports/sysdeps/alpha/fpu/e_sqrtf.c @@ -0,0 +1,14 @@ +#include <shlib-compat.h> + +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +# define __sqrtf_finite __sqrtf_finite1 +#endif + +#include <sysdeps/ieee754/flt-32/e_sqrtf.c> + +/* Work around forgotten symbol in alphaev6 build. */ +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +# undef __sqrtf_finite +compat_symbol (libm, __sqrtf_finite1, __sqrtf_finite, GLIBC_2_15); +versioned_symbol (libm, __ieee754_sqrtf, __sqrtf_finite, GLIBC_2_18); +#endif diff --git a/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c b/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c index 40e97b887..2cb076e4c 100644 --- a/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c +++ b/libc/ports/sysdeps/alpha/soft-fp/e_sqrtl.c @@ -21,6 +21,7 @@ #include <stdlib.h> #include <soft-fp.h> #include <quad.h> +#include <shlib-compat.h> long double __ieee754_sqrtl (const long double a) @@ -37,3 +38,12 @@ __ieee754_sqrtl (const long double a) FP_HANDLE_EXCEPTIONS; return c; } + +/* ??? We forgot to add this symbol in 2.15. Getting this into 2.18 isn't as + straight-forward as just adding the alias, since a generic Versions file + includes the 2.15 version and the linker uses the first one it sees. */ +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +versioned_symbol (libm, __ieee754_sqrtl, __sqrtl_finite, GLIBC_2_18); +#else +strong_alias(__ieee754_sqrtl, __sqrtl_finite) +#endif |