diff mbox series

[v4,2/5] math: Fix isnanf128 static build (BZ 31774)

Message ID 20240521165430.2998944-3-adhemerval.zanella@linaro.org
State Accepted
Commit 5d4999e519ec77e75bef920e2540e8605015680a
Headers show
Series Improve libm.a static coverage | expand

Commit Message

Adhemerval Zanella Netto May 21, 2024, 4:52 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.
---
 sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

H.J. Lu May 21, 2024, 5:32 p.m. UTC | #1
On Tue, May 21, 2024 at 9:54 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> Some static implementation of float128 routines might call __isnanf128,
> which is not provided by the static object.
>
> Checked on x86_64-linux-gnu.
> ---
>  sysdeps/ieee754/float128/s_isnanf128.c | 4 ++++
>  1 file changed, 4 insertions(+)
>
> 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.43.0
>

LGTM.

Reviewed-by: H.J. Lu <hjl.tools@gmail.com>

Thanks.
diff mbox series

Patch

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