aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2022-08-02 15:42:14 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-02-09 10:29:18 -0300
commitaf7dd132ec4be56c61c802edd80c5d31fbbca270 (patch)
tree234b1055aac349617bec1084d492058e70cb66bc
parenta7d6f82cb23f0d5f00b8ee34585ed40ce476a591 (diff)
downloadglibc-af7dd132ec4be56c61c802edd80c5d31fbbca270.tar
glibc-af7dd132ec4be56c61c802edd80c5d31fbbca270.tar.gz
glibc-af7dd132ec4be56c61c802edd80c5d31fbbca270.tar.bz2
glibc-af7dd132ec4be56c61c802edd80c5d31fbbca270.zip
math: Handle fabsf128 intra PLT for !__USE_EXTERN_INLINES
If compiler does not support __USE_EXTERN_INLINES we need to route fabsf128 call to an internal symbol.
-rw-r--r--include/math.h11
-rw-r--r--sysdeps/ieee754/float128/s_fabsf128.c3
2 files changed, 11 insertions, 3 deletions
diff --git a/include/math.h b/include/math.h
index fa11a710a6..262c302728 100644
--- a/include/math.h
+++ b/include/math.h
@@ -109,9 +109,11 @@ __issignalingf (float x)
# if __HAVE_DISTINCT_FLOAT128
+# ifdef __USE_EXTERN_INLINES
+
/* __builtin_isinf_sign is broken in GCC < 7 for float128. */
-# if ! __GNUC_PREREQ (7, 0)
-# include <ieee754_float128.h>
+# if ! __GNUC_PREREQ (7, 0)
+# include <ieee754_float128.h>
extern inline int
__isinff128 (_Float128 x)
{
@@ -121,13 +123,16 @@ __isinff128 (_Float128 x)
lx |= -lx;
return ~(lx >> 63) & (hx >> 62);
}
-# endif
+# endif
extern inline _Float128
fabsf128 (_Float128 x)
{
return __builtin_fabsf128 (x);
}
+# else
+libm_hidden_proto (fabsf128)
+# endif
# endif
# if !(defined __FINITE_MATH_ONLY__ && __FINITE_MATH_ONLY__ > 0)
diff --git a/sysdeps/ieee754/float128/s_fabsf128.c b/sysdeps/ieee754/float128/s_fabsf128.c
index 79ba47c3fd..d877b0214f 100644
--- a/sysdeps/ieee754/float128/s_fabsf128.c
+++ b/sysdeps/ieee754/float128/s_fabsf128.c
@@ -1,2 +1,5 @@
#include <float128_private.h>
#include "../ldbl-128/s_fabsl.c"
+#ifndef __USE_EXTERN_INLINES
+libm_hidden_def (fabsf128)
+#endif