[PATCH v2 07/10] math: Fix isnanf128 static build
Adhemerval Zanella
adhemerval.zanella@linaro.org
Wed Mar 27 19:40:21 GMT 2024
Some static implementation of float128 routines might call __isnanf128,
which is not provided by the static object.
Checked on x86_64-linux-gnu.
---
math/Makefile | 1 +
sysdeps/ieee754/float128/float128_private.h | 2 +-
sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++
3 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/math/Makefile b/math/Makefile
index f1d210797d..516fa72a26 100644
--- a/math/Makefile
+++ b/math/Makefile
@@ -372,6 +372,7 @@ libm-test-funcs-auto-static = \
# libm-test-funcs-auto-static
libm-test-funcs-noauto-static = \
fmod \
+ isnan \
# libm-test-funcs-noauto-static
libm-test-funcs-narrow-static =
libm-test-funcs-all-static = $(libm-test-funcs-auto-static) $(libm-test-funcs-noauto-static)
diff --git a/sysdeps/ieee754/float128/float128_private.h b/sysdeps/ieee754/float128/float128_private.h
index 38a8bdd0fe..672bf3cccf 100644
--- a/sysdeps/ieee754/float128/float128_private.h
+++ b/sysdeps/ieee754/float128/float128_private.h
@@ -352,7 +352,7 @@
#define frexpl frexpf128
#define getpayloadl getpayloadf128
#define isinfl isinff128_do_not_use
-#define isnanl isnanf128_do_not_use
+#define isnanl isnanf128
#define ldexpl ldexpf128
#define llrintl llrintf128
#define llroundl llroundf128
diff --git a/sysdeps/ieee754/float128/s_isnanf128.c b/sysdeps/ieee754/float128/s_isnanf128.c
index 59f71533ce..b73a4e80d7 100644
--- a/sysdeps/ieee754/float128/s_isnanf128.c
+++ b/sysdeps/ieee754/float128/s_isnanf128.c
@@ -11,7 +11,11 @@
#include "../ldbl-128/s_isnanl.c"
#if !IS_IN (libm)
#include <float128-abi.h>
+#ifdef SHARED
hidden_ver (__isnanf128_impl, __isnanf128)
+#else
+strong_alias (__isnanf128_impl, __isnanf128)
+#endif
_weak_alias (__isnanf128_impl, isnanl)
versioned_symbol (libc, __isnanf128_impl, __isnanf128, GLIBC_2_34);
#if (SHLIB_COMPAT (libc, FLOAT128_VERSION_M, GLIBC_2_34))
--
2.34.1
More information about the Libc-alpha
mailing list