public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH v2] math: Provide missing math symbols on libc.a (BZ 31781)
@ 2024-05-22 18:07 Adhemerval Zanella
  2024-05-22 19:30 ` H.J. Lu
  0 siblings, 1 reply; 2+ messages in thread
From: Adhemerval Zanella @ 2024-05-22 18:07 UTC (permalink / raw)
  To: libc-alpha; +Cc: H . J . Lu

The libc.a for alpha, s390, and sparcv9 does not provide
copysignf64x, copysignf128, frexpf64x, frexpf128, modff64x, and
modff128.

Checked with a static build for the affected ABIs.
---
 sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++--
 sysdeps/ieee754/ldbl-64-128/s_frexpl.c    | 4 ++--
 sysdeps/ieee754/ldbl-64-128/s_modfl.c     | 4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
index 11b42d04ba..80137847d3 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
@@ -1,10 +1,10 @@
 #include <math_ldbl_opt.h>
 #include <libm-alias-ldouble.h>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
 # undef libm_alias_ldouble
 # define libm_alias_ldouble(from, to)
 #endif
 #include <sysdeps/ieee754/ldbl-128/s_copysignl.c>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
 long_double_symbol (libc, __copysignl, copysignl);
 #endif
diff --git a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
index 73ac41e40c..f5f7d349f7 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
@@ -1,10 +1,10 @@
 #include <math_ldbl_opt.h>
 #include <libm-alias-ldouble.h>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
 # undef libm_alias_ldouble
 # define libm_alias_ldouble(from, to)
 #endif
 #include <sysdeps/ieee754/ldbl-128/s_frexpl.c>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
 long_double_symbol (libc, __frexpl, frexpl);
 #endif
diff --git a/sysdeps/ieee754/ldbl-64-128/s_modfl.c b/sysdeps/ieee754/ldbl-64-128/s_modfl.c
index 7d7aeae111..ba3d31334a 100644
--- a/sysdeps/ieee754/ldbl-64-128/s_modfl.c
+++ b/sysdeps/ieee754/ldbl-64-128/s_modfl.c
@@ -1,10 +1,10 @@
 #include <math_ldbl_opt.h>
 #include <libm-alias-ldouble.h>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
 # undef libm_alias_ldouble
 # define libm_alias_ldouble(from, to)
 #endif
 #include <sysdeps/ieee754/ldbl-128/s_modfl.c>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
 long_double_symbol (libc, __modfl, modfl);
 #endif
-- 
2.43.0


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH v2] math: Provide missing math symbols on libc.a (BZ 31781)
  2024-05-22 18:07 [PATCH v2] math: Provide missing math symbols on libc.a (BZ 31781) Adhemerval Zanella
@ 2024-05-22 19:30 ` H.J. Lu
  0 siblings, 0 replies; 2+ messages in thread
From: H.J. Lu @ 2024-05-22 19:30 UTC (permalink / raw)
  To: Adhemerval Zanella; +Cc: libc-alpha

On Wed, May 22, 2024 at 11:07 AM Adhemerval Zanella
<adhemerval.zanella@linaro.org> wrote:
>
> The libc.a for alpha, s390, and sparcv9 does not provide
> copysignf64x, copysignf128, frexpf64x, frexpf128, modff64x, and
> modff128.
>
> Checked with a static build for the affected ABIs.
> ---
>  sysdeps/ieee754/ldbl-64-128/s_copysignl.c | 4 ++--
>  sysdeps/ieee754/ldbl-64-128/s_frexpl.c    | 4 ++--
>  sysdeps/ieee754/ldbl-64-128/s_modfl.c     | 4 ++--
>  3 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
> index 11b42d04ba..80137847d3 100644
> --- a/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
> +++ b/sysdeps/ieee754/ldbl-64-128/s_copysignl.c
> @@ -1,10 +1,10 @@
>  #include <math_ldbl_opt.h>
>  #include <libm-alias-ldouble.h>
> -#if IS_IN (libc)
> +#if IS_IN (libc) && defined SHARED
>  # undef libm_alias_ldouble
>  # define libm_alias_ldouble(from, to)
>  #endif
>  #include <sysdeps/ieee754/ldbl-128/s_copysignl.c>
> -#if IS_IN (libc)
> +#if IS_IN (libc) && defined SHARED
>  long_double_symbol (libc, __copysignl, copysignl);
>  #endif
> diff --git a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
> index 73ac41e40c..f5f7d349f7 100644
> --- a/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
> +++ b/sysdeps/ieee754/ldbl-64-128/s_frexpl.c
> @@ -1,10 +1,10 @@
>  #include <math_ldbl_opt.h>
>  #include <libm-alias-ldouble.h>
> -#if IS_IN (libc)
> +#if IS_IN (libc) && defined SHARED
>  # undef libm_alias_ldouble
>  # define libm_alias_ldouble(from, to)
>  #endif
>  #include <sysdeps/ieee754/ldbl-128/s_frexpl.c>
> -#if IS_IN (libc)
> +#if IS_IN (libc) && defined SHARED
>  long_double_symbol (libc, __frexpl, frexpl);
>  #endif
> diff --git a/sysdeps/ieee754/ldbl-64-128/s_modfl.c b/sysdeps/ieee754/ldbl-64-128/s_modfl.c
> index 7d7aeae111..ba3d31334a 100644
> --- a/sysdeps/ieee754/ldbl-64-128/s_modfl.c
> +++ b/sysdeps/ieee754/ldbl-64-128/s_modfl.c
> @@ -1,10 +1,10 @@
>  #include <math_ldbl_opt.h>
>  #include <libm-alias-ldouble.h>
> -#if IS_IN (libc)
> +#if IS_IN (libc) && defined SHARED
>  # undef libm_alias_ldouble
>  # define libm_alias_ldouble(from, to)
>  #endif
>  #include <sysdeps/ieee754/ldbl-128/s_modfl.c>
> -#if IS_IN (libc)
> +#if IS_IN (libc) && defined SHARED
>  long_double_symbol (libc, __modfl, modfl);
>  #endif
> --
> 2.43.0
>

LGTM.

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

Thanks.

-- 
H.J.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-05-22 19:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-05-22 18:07 [PATCH v2] math: Provide missing math symbols on libc.a (BZ 31781) Adhemerval Zanella
2024-05-22 19:30 ` H.J. Lu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).