From 385fd0d524817f171c715c1ca0e5647741584682 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Mon, 24 Jun 2013 09:59:26 -0700 Subject: [BZ #15666] alpha: Add __sqrt*_finite definitions With compatibility for ev6 and non-ev6 builds, as the non-ev6 did manage to get definitions emitted for the float and double functions. --- ports/sysdeps/alpha/fpu/e_sqrt.c | 22 ++++++++++++++++++++++ ports/sysdeps/alpha/fpu/e_sqrtf.c | 14 ++++++++++++++ 2 files changed, 36 insertions(+) create mode 100644 ports/sysdeps/alpha/fpu/e_sqrtf.c (limited to 'ports/sysdeps/alpha/fpu') diff --git a/ports/sysdeps/alpha/fpu/e_sqrt.c b/ports/sysdeps/alpha/fpu/e_sqrt.c index 538ff1da62..6abca0896e 100644 --- a/ports/sysdeps/alpha/fpu/e_sqrt.c +++ b/ports/sysdeps/alpha/fpu/e_sqrt.c @@ -18,6 +18,7 @@ #include #include +#include #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 + +/* 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/ports/sysdeps/alpha/fpu/e_sqrtf.c b/ports/sysdeps/alpha/fpu/e_sqrtf.c new file mode 100644 index 0000000000..ad523f5cf2 --- /dev/null +++ b/ports/sysdeps/alpha/fpu/e_sqrtf.c @@ -0,0 +1,14 @@ +#include + +#if SHLIB_COMPAT (libm, GLIBC_2_15, GLIBC_2_18) +# define __sqrtf_finite __sqrtf_finite1 +#endif + +#include + +/* 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 -- cgit v1.2.1