diff mbox series

[07/15] math: Fix isnanf128 static build

Message ID 20240327164527.3717523-8-adhemerval.zanella@linaro.org
State Superseded
Headers show
Series Fix some libm static issues | expand

Commit Message

Adhemerval Zanella Netto March 27, 2024, 4:45 p.m. UTC
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 mbox series

Patch

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))