From 502561a1bcd3bd4cb07372c8b3569413e3bc27dfe10ad97fb2f0fd9af142f17f Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 24 Feb 2025 09:47:46 +0000 Subject: [PATCH] - Build cross-hppa and cross-loongarch64 only with gcc >= 14 - round-log10p1f.patch: math: Fix log10p1f internal table value (BZ #32626) - round-sinhf.patch: math: Fix sinhf for some inputs (BZ #32627) - nptl-stack-size-up.patch: nptl: Correct stack size attribute when stack grows up (BZ #32574) - round-tanf.patch: math: Fix tanf for some inputs (BZ 32630) - tst-aarch64-pkey.patch: Fix tst-aarch64-pkey to handle ENOSPC as not supported - float128-sycl.patch: x86 (__HAVE_FLOAT128): Defined to 0 for Intel SYCL compiler (BZ #32723) OBS-URL: https://build.opensuse.org/package/show/Base:System/glibc?expand=0&rev=733 --- float128-sycl.patch | 48 ++++++++++++++++++++++++ glibc.changes | 15 ++++++++ glibc.spec | 17 +++++++++ nptl-stack-size-up.patch | 40 ++++++++++++++++++++ round-log10p1f.patch | 80 ++++++++++++++++++++++++++++++++++++++++ round-sinhf.patch | 76 ++++++++++++++++++++++++++++++++++++++ round-tanf.patch | 79 +++++++++++++++++++++++++++++++++++++++ tst-aarch64-pkey.patch | 37 +++++++++++++++++++ 8 files changed, 392 insertions(+) create mode 100644 float128-sycl.patch create mode 100644 nptl-stack-size-up.patch create mode 100644 round-log10p1f.patch create mode 100644 round-sinhf.patch create mode 100644 round-tanf.patch create mode 100644 tst-aarch64-pkey.patch diff --git a/float128-sycl.patch b/float128-sycl.patch new file mode 100644 index 0000000..bf8525c --- /dev/null +++ b/float128-sycl.patch @@ -0,0 +1,48 @@ +From a900dbaf70f0a957f56b52caa69173592ad7596e Mon Sep 17 00:00:00 2001 +From: "H.J. Lu" +Date: Thu, 20 Feb 2025 07:08:26 +0800 +Subject: [PATCH] x86 (__HAVE_FLOAT128): Defined to 0 for Intel SYCL compiler + [BZ #32723] + +Intel compiler always defines __INTEL_LLVM_COMPILER. When SYCL is +enabled by -fsycl, it also defines SYCL_LANGUAGE_VERSION. Since Intel +SYCL compiler doesn't support _Float128: + +https://github.com/intel/llvm/issues/16903 + +define __HAVE_FLOAT128 to 0 for Intel SYCL compiler. + +This fixes BZ #32723. + +Signed-off-by: H.J. Lu +Reviewed-by: Sam James +(cherry picked from commit 5a4573be6f96ff49111bb6cae767676b5aafa7a8) +--- + sysdeps/x86/bits/floatn.h | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/sysdeps/x86/bits/floatn.h b/sysdeps/x86/bits/floatn.h +index d197cb10dd..adc7ed2e9e 100644 +--- a/sysdeps/x86/bits/floatn.h ++++ b/sysdeps/x86/bits/floatn.h +@@ -25,11 +25,15 @@ + floating-point type with the IEEE 754 binary128 format, and this + glibc includes corresponding *f128 interfaces for it. The required + libgcc support was added some time after the basic compiler +- support, for x86_64 and x86. */ ++ support, for x86_64 and x86. Intel SYCL compiler doesn't support ++ _Float128: https://github.com/intel/llvm/issues/16903 ++ */ + #if (defined __x86_64__ \ + ? __GNUC_PREREQ (4, 3) \ + : (defined __GNU__ ? __GNUC_PREREQ (4, 5) : __GNUC_PREREQ (4, 4))) \ +- || __glibc_clang_prereq (3, 4) ++ || (__glibc_clang_prereq (3, 4) \ ++ && (!defined __INTEL_LLVM_COMPILER \ ++ || !defined SYCL_LANGUAGE_VERSION)) + # define __HAVE_FLOAT128 1 + #else + # define __HAVE_FLOAT128 0 +-- +2.48.1 + diff --git a/glibc.changes b/glibc.changes index a906b8c..f987788 100644 --- a/glibc.changes +++ b/glibc.changes @@ -1,3 +1,18 @@ +------------------------------------------------------------------- +Thu Feb 20 09:53:20 UTC 2025 - Andreas Schwab + +- Build cross-hppa and cross-loongarch64 only with gcc >= 14 +- round-log10p1f.patch: math: Fix log10p1f internal table value (BZ + #32626) +- round-sinhf.patch: math: Fix sinhf for some inputs (BZ #32627) +- nptl-stack-size-up.patch: nptl: Correct stack size attribute when stack + grows up (BZ #32574) +- round-tanf.patch: math: Fix tanf for some inputs (BZ 32630) +- tst-aarch64-pkey.patch: Fix tst-aarch64-pkey to handle ENOSPC as not + supported +- float128-sycl.patch: x86 (__HAVE_FLOAT128): Defined to 0 for Intel SYCL + compiler (BZ #32723) + ------------------------------------------------------------------- Mon Feb 17 10:37:02 UTC 2025 - Andreas Schwab diff --git a/glibc.spec b/glibc.spec index 961fbd5..e08236c 100644 --- a/glibc.spec +++ b/glibc.spec @@ -284,6 +284,11 @@ BuildArch: i686 # Sync only this build counter with the main build #!BcntSyncTag: glibc %endif +%if 0%{?gcc_version} < 14 +%if "%flavor" == "cross-loongarch64" || "%flavor" == "cross-hppa" +ExclusiveArch: do_not_build +%endif +%endif ### # Patches are ordered in the following groups: @@ -336,6 +341,18 @@ Patch306: glibc-fix-double-loopback.diff %if %{without snapshot} ### # Patches from upstream +# PATCH-FIX-UPSTREAM math: Fix log10p1f internal table value (BZ #32626) +Patch1000: round-log10p1f.patch +# PATCH-FIX-UPSTREAM math: Fix sinhf for some inputs (BZ #32627) +Patch1001: round-sinhf.patch +# PATCH-FIX-UPSTREAM nptl: Correct stack size attribute when stack grows up (BZ #32574) +Patch1002: nptl-stack-size-up.patch +# PATCH-FIX-UPSTREAM math: Fix tanf for some inputs (BZ 32630) +Patch1003: round-tanf.patch +# PATCH-FIX-UPSTREAM Fix tst-aarch64-pkey to handle ENOSPC as not supported +Patch1004: tst-aarch64-pkey.patch +# PATCH-FIX-UPSTREAM x86 (__HAVE_FLOAT128): Defined to 0 for Intel SYCL compiler (BZ #32723) +Patch1005: float128-sycl.patch ### %endif diff --git a/nptl-stack-size-up.patch b/nptl-stack-size-up.patch new file mode 100644 index 0000000..bdb5041 --- /dev/null +++ b/nptl-stack-size-up.patch @@ -0,0 +1,40 @@ +From cb7f20653724029be89224ed3a35d627cc5b4163 Mon Sep 17 00:00:00 2001 +From: John David Anglin +Date: Wed, 29 Jan 2025 16:51:16 -0500 +Subject: [PATCH] nptl: Correct stack size attribute when stack grows up [BZ + #32574] + +Set stack size attribute to the size of the mmap'd region only +when the size of the remaining stack space is less than the size +of the mmap'd region. + +This was reversed. As a result, the initial stack size was only +135168 bytes. On architectures where the stack grows down, the +initial stack size is approximately 8384512 bytes with the default +rlimit settings. The small main stack size on hppa broke +applications like ruby that check for stack overflows. + +Signed-off-by: John David Anglin +--- + nptl/pthread_getattr_np.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/nptl/pthread_getattr_np.c b/nptl/pthread_getattr_np.c +index e98e2df152..43dd16d59c 100644 +--- a/nptl/pthread_getattr_np.c ++++ b/nptl/pthread_getattr_np.c +@@ -145,9 +145,9 @@ __pthread_getattr_np (pthread_t thread_id, pthread_attr_t *attr) + > (size_t) iattr->stackaddr - last_to) + iattr->stacksize = (size_t) iattr->stackaddr - last_to; + #else +- /* The limit might be too high. */ ++ /* The limit might be too low. */ + if ((size_t) iattr->stacksize +- > to - (size_t) iattr->stackaddr) ++ < to - (size_t) iattr->stackaddr) + iattr->stacksize = to - (size_t) iattr->stackaddr; + #endif + /* We succeed and no need to look further. */ +-- +2.48.1 + diff --git a/round-log10p1f.patch b/round-log10p1f.patch new file mode 100644 index 0000000..a007a86 --- /dev/null +++ b/round-log10p1f.patch @@ -0,0 +1,80 @@ +From bdccbfbc52d3f6957768a0b9d5bd7bc4c90f2744 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Fri, 31 Jan 2025 10:27:39 -0300 +Subject: [PATCH] math: Fix log10p1f internal table value (BZ 32626) + +It was copied wrong from CORE-MATH. + +(cherry picked from commit c79277a16785c8ae96d821414f4d31d654a0177c) +--- + NEWS | 3 ++- + math/auto-libm-test-in | 2 ++ + math/auto-libm-test-out-log10p1 | 25 +++++++++++++++++++++++++ + sysdeps/ieee754/flt-32/s_log10p1f.c | 2 +- + 4 files changed, 30 insertions(+), 2 deletions(-) + +diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in +index 01ba689aa8..c0627dc7eb 100644 +--- a/math/auto-libm-test-in ++++ b/math/auto-libm-test-in +@@ -7291,6 +7291,8 @@ log10p1 -0x1p-125 + log10p1 -0x1p-1021 + log10p1 -0x1p-16381 + ++log10p1 0x1.27f7dap-17 ++ + log10p1 0x7.2a4368p-4 + log10p1 0x6.d3a118p-4 + log10p1 0x5.03f228p+0 +diff --git a/math/auto-libm-test-out-log10p1 b/math/auto-libm-test-out-log10p1 +index 87bdb0bcde..f5ce965720 100644 +--- a/math/auto-libm-test-out-log10p1 ++++ b/math/auto-libm-test-out-log10p1 +@@ -1789,6 +1789,31 @@ log10p1 -0x1p-16381 + = log10p1 tonearest binary128 -0x8p-16384 : -0x3.796f62a4dca1c654d56eaabeb4dp-16384 : inexact-ok underflow errno-erange-ok + = log10p1 towardzero binary128 -0x8p-16384 : -0x3.796f62a4dca1c654d56eaabeb4ccp-16384 : inexact-ok underflow errno-erange-ok + = log10p1 upward binary128 -0x8p-16384 : -0x3.796f62a4dca1c654d56eaabeb4ccp-16384 : inexact-ok underflow errno-erange-ok ++log10p1 0x1.27f7dap-17 ++= log10p1 downward binary32 0x9.3fbedp-20 : 0x4.044b5p-20 : inexact-ok ++= log10p1 tonearest binary32 0x9.3fbedp-20 : 0x4.044b5p-20 : inexact-ok ++= log10p1 towardzero binary32 0x9.3fbedp-20 : 0x4.044b5p-20 : inexact-ok ++= log10p1 upward binary32 0x9.3fbedp-20 : 0x4.044b58p-20 : inexact-ok ++= log10p1 downward binary64 0x9.3fbedp-20 : 0x4.044b5157872ep-20 : inexact-ok ++= log10p1 tonearest binary64 0x9.3fbedp-20 : 0x4.044b5157872e4p-20 : inexact-ok ++= log10p1 towardzero binary64 0x9.3fbedp-20 : 0x4.044b5157872ep-20 : inexact-ok ++= log10p1 upward binary64 0x9.3fbedp-20 : 0x4.044b5157872e4p-20 : inexact-ok ++= log10p1 downward intel96 0x9.3fbedp-20 : 0x4.044b5157872e2868p-20 : inexact-ok ++= log10p1 tonearest intel96 0x9.3fbedp-20 : 0x4.044b5157872e2868p-20 : inexact-ok ++= log10p1 towardzero intel96 0x9.3fbedp-20 : 0x4.044b5157872e2868p-20 : inexact-ok ++= log10p1 upward intel96 0x9.3fbedp-20 : 0x4.044b5157872e287p-20 : inexact-ok ++= log10p1 downward m68k96 0x9.3fbedp-20 : 0x4.044b5157872e2868p-20 : inexact-ok ++= log10p1 tonearest m68k96 0x9.3fbedp-20 : 0x4.044b5157872e2868p-20 : inexact-ok ++= log10p1 towardzero m68k96 0x9.3fbedp-20 : 0x4.044b5157872e2868p-20 : inexact-ok ++= log10p1 upward m68k96 0x9.3fbedp-20 : 0x4.044b5157872e287p-20 : inexact-ok ++= log10p1 downward binary128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d808p-20 : inexact-ok ++= log10p1 tonearest binary128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d80cp-20 : inexact-ok ++= log10p1 towardzero binary128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d808p-20 : inexact-ok ++= log10p1 upward binary128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d80cp-20 : inexact-ok ++= log10p1 downward ibm128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d8p-20 : inexact-ok ++= log10p1 tonearest ibm128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d8p-20 : inexact-ok ++= log10p1 towardzero ibm128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287d8p-20 : inexact-ok ++= log10p1 upward ibm128 0x9.3fbedp-20 : 0x4.044b5157872e2868f5c04287dap-20 : inexact-ok + log10p1 0x7.2a4368p-4 + = log10p1 downward binary32 0x7.2a4368p-4 : 0x2.9248dcp-4 : inexact-ok + = log10p1 tonearest binary32 0x7.2a4368p-4 : 0x2.9248ep-4 : inexact-ok +diff --git a/sysdeps/ieee754/flt-32/s_log10p1f.c b/sysdeps/ieee754/flt-32/s_log10p1f.c +index 64deb1eeda..4e11d55d49 100644 +--- a/sysdeps/ieee754/flt-32/s_log10p1f.c ++++ b/sysdeps/ieee754/flt-32/s_log10p1f.c +@@ -70,7 +70,7 @@ __log10p1f (float x) + }; + static const double tl[] = + { +- 0x1.562ec497ef351p-43, 0x1.b9476892ea99cp-8, 0x1.b5e909c959eecp-7, ++ -0x1.562ec497ef351p-43, 0x1.b9476892ea99cp-8, 0x1.b5e909c959eecp-7, + 0x1.45f4f59ec84fp-6, 0x1.af5f92cbcf2aap-6, 0x1.0ba01a6069052p-5, + 0x1.3ed119b99dd41p-5, 0x1.714834298a088p-5, 0x1.a30a9d98309c1p-5, + 0x1.d41d51266b9d9p-5, 0x1.02428c0f62dfcp-4, 0x1.1a23444eea521p-4, +-- +2.48.1 + diff --git a/round-sinhf.patch b/round-sinhf.patch new file mode 100644 index 0000000..c1f55ba --- /dev/null +++ b/round-sinhf.patch @@ -0,0 +1,76 @@ +From d85a7719536f4892f2b53d4594e18f6d096c2882 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Fri, 31 Jan 2025 10:34:32 -0300 +Subject: [PATCH] math: Fix sinhf for some inputs (BZ 32627) + +The logic was copied wrong from CORE-MATH. +--- + math/auto-libm-test-in | 1 + + math/auto-libm-test-out-sinh | 25 +++++++++++++++++++++++++ + sysdeps/ieee754/flt-32/e_sinhf.c | 2 +- + 3 files changed, 27 insertions(+), 1 deletion(-) + +diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in +index c0627dc7eb..5f465b31f1 100644 +--- a/math/auto-libm-test-in ++++ b/math/auto-libm-test-in +@@ -8300,6 +8300,7 @@ sinh -0x1.3dda8ap+0 + sinh -0x5.ee9218p-4 + sinh -0x1.bcfc98p+0 + sinh -0x6.9bbb6df7c5d08p-4 ++sinh 0x1.250bfep-11 + # the next value generates larger error bounds on x86_64 (ldbl-96) + sinh 0x2.c5d376167f4052f4p+12 + sinh max +diff --git a/math/auto-libm-test-out-sinh b/math/auto-libm-test-out-sinh +index 0b77a77eeb..3924e19d86 100644 +--- a/math/auto-libm-test-out-sinh ++++ b/math/auto-libm-test-out-sinh +@@ -2115,6 +2115,31 @@ sinh -0x6.9bbb6df7c5d08p-4 + = sinh tonearest ibm128 -0x6.9bbb6df7c5d08p-4 : -0x6.cc3ddf003dcda77f8f9e892e36p-4 : inexact-ok + = sinh towardzero ibm128 -0x6.9bbb6df7c5d08p-4 : -0x6.cc3ddf003dcda77f8f9e892e36p-4 : inexact-ok + = sinh upward ibm128 -0x6.9bbb6df7c5d08p-4 : -0x6.cc3ddf003dcda77f8f9e892e36p-4 : inexact-ok ++sinh 0x1.250bfep-11 ++= sinh downward binary32 0x2.4a17fcp-12 : 0x2.4a17fcp-12 : inexact-ok ++= sinh tonearest binary32 0x2.4a17fcp-12 : 0x2.4a17fcp-12 : inexact-ok ++= sinh towardzero binary32 0x2.4a17fcp-12 : 0x2.4a17fcp-12 : inexact-ok ++= sinh upward binary32 0x2.4a17fcp-12 : 0x2.4a18p-12 : inexact-ok ++= sinh downward binary64 0x2.4a17fcp-12 : 0x2.4a17fdffffffep-12 : inexact-ok ++= sinh tonearest binary64 0x2.4a17fcp-12 : 0x2.4a17fep-12 : inexact-ok ++= sinh towardzero binary64 0x2.4a17fcp-12 : 0x2.4a17fdffffffep-12 : inexact-ok ++= sinh upward binary64 0x2.4a17fcp-12 : 0x2.4a17fep-12 : inexact-ok ++= sinh downward intel96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87cp-12 : inexact-ok ++= sinh tonearest intel96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff88p-12 : inexact-ok ++= sinh towardzero intel96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87cp-12 : inexact-ok ++= sinh upward intel96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff88p-12 : inexact-ok ++= sinh downward m68k96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87cp-12 : inexact-ok ++= sinh tonearest m68k96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff88p-12 : inexact-ok ++= sinh towardzero m68k96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87cp-12 : inexact-ok ++= sinh upward m68k96 0x2.4a17fcp-12 : 0x2.4a17fdfffffff88p-12 : inexact-ok ++= sinh downward binary128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786ec88p-12 : inexact-ok ++= sinh tonearest binary128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786ec8ap-12 : inexact-ok ++= sinh towardzero binary128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786ec88p-12 : inexact-ok ++= sinh upward binary128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786ec8ap-12 : inexact-ok ++= sinh downward ibm128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786ecp-12 : inexact-ok ++= sinh tonearest ibm128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786edp-12 : inexact-ok ++= sinh towardzero ibm128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786ecp-12 : inexact-ok ++= sinh upward ibm128 0x2.4a17fcp-12 : 0x2.4a17fdfffffff87e8d322786edp-12 : inexact-ok + sinh 0x2.c5d376167f4052f4p+12 + = sinh downward binary32 0x2.c5d378p+12 : 0xf.fffffp+124 : inexact-ok overflow errno-erange-ok + = sinh tonearest binary32 0x2.c5d378p+12 : plus_infty : inexact-ok overflow errno-erange +diff --git a/sysdeps/ieee754/flt-32/e_sinhf.c b/sysdeps/ieee754/flt-32/e_sinhf.c +index c007c7d174..dee96fc7cb 100644 +--- a/sysdeps/ieee754/flt-32/e_sinhf.c ++++ b/sysdeps/ieee754/flt-32/e_sinhf.c +@@ -83,7 +83,7 @@ __ieee754_sinhf (float x) + { /* |x| <= 0x1.250bfep-11 */ + if (__glibc_unlikely (ux < 0x66000000u)) /* |x| < 0x1p-24 */ + return fmaf (x, fabsf (x), x); +- if (__glibc_unlikely (st.uarg == asuint (ux))) ++ if (__glibc_unlikely (st.uarg == ux)) + { + float sgn = copysignf (1.0f, x); + return sgn * st.rh + sgn * st.rl; +-- +2.48.1 + diff --git a/round-tanf.patch b/round-tanf.patch new file mode 100644 index 0000000..18d95bb --- /dev/null +++ b/round-tanf.patch @@ -0,0 +1,79 @@ +From cf88351b685da86667e17d344414a70696ac82f1 Mon Sep 17 00:00:00 2001 +From: Adhemerval Zanella +Date: Sun, 2 Feb 2025 16:57:49 -0300 +Subject: [PATCH] math: Fix tanf for some inputs (BZ 32630) + +The logic was copied wrong from CORE-MATH. + +(cherry picked from commit 09e7f4d594b4308fbea18e3044148d67b59757c9) +--- + NEWS | 2 ++ + math/auto-libm-test-in | 1 + + math/auto-libm-test-out-tan | 25 +++++++++++++++++++++++++ + sysdeps/ieee754/flt-32/s_tanf.c | 2 +- + 4 files changed, 29 insertions(+), 1 deletion(-) + +diff --git a/math/auto-libm-test-in b/math/auto-libm-test-in +index 5f465b31f1..4f194da19d 100644 +--- a/math/auto-libm-test-in ++++ b/math/auto-libm-test-in +@@ -8664,6 +8664,7 @@ tan 0x1.1ad374p+0 + tan -0x1.0d55b8p+0 + tan 1.57079697 + tan -1.57079697 ++tan 0x1.ada6aap+27 + tan 0x1p-5 + tan 0x1p-10 + tan 0x1p-15 +diff --git a/math/auto-libm-test-out-tan b/math/auto-libm-test-out-tan +index 7d00d03e1d..1d5999ab90 100644 +--- a/math/auto-libm-test-out-tan ++++ b/math/auto-libm-test-out-tan +@@ -2532,6 +2532,31 @@ tan -1.57079697 + = tan tonearest ibm128 -0x1.921fc00ece4f02f278ade6ad9fp+0 : 0x1.7b91a0851bbbafa14cf21c2b5c8p+20 : inexact-ok + = tan towardzero ibm128 -0x1.921fc00ece4f02f278ade6ad9fp+0 : 0x1.7b91a0851bbbafa14cf21c2b5cp+20 : inexact-ok + = tan upward ibm128 -0x1.921fc00ece4f02f278ade6ad9fp+0 : 0x1.7b91a0851bbbafa14cf21c2b5c8p+20 : inexact-ok ++tan 0x1.ada6aap+27 ++= tan downward binary32 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok ++= tan tonearest binary32 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok ++= tan towardzero binary32 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok ++= tan upward binary32 0xd.6d355p+24 : 0x3.d0060cp-4 : inexact-ok ++= tan downward binary64 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok ++= tan tonearest binary64 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok ++= tan towardzero binary64 0xd.6d355p+24 : 0x3.d00608p-4 : inexact-ok ++= tan upward binary64 0xd.6d355p+24 : 0x3.d006080000002p-4 : inexact-ok ++= tan downward intel96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok ++= tan tonearest intel96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok ++= tan towardzero intel96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok ++= tan upward intel96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok ++= tan downward m68k96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok ++= tan tonearest m68k96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok ++= tan towardzero m68k96 0xd.6d355p+24 : 0x3.d006080000000504p-4 : inexact-ok ++= tan upward m68k96 0xd.6d355p+24 : 0x3.d006080000000508p-4 : inexact-ok ++= tan downward binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15ap-4 : inexact-ok ++= tan tonearest binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15ap-4 : inexact-ok ++= tan towardzero binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15ap-4 : inexact-ok ++= tan upward binary128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c15cp-4 : inexact-ok ++= tan downward ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c1p-4 : inexact-ok ++= tan tonearest ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c1p-4 : inexact-ok ++= tan towardzero ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c1p-4 : inexact-ok ++= tan upward ibm128 0xd.6d355p+24 : 0x3.d0060800000005067d16c1c9c2p-4 : inexact-ok + tan 0x1p-5 + = tan downward binary32 0x8p-8 : 0x8.00aabp-8 : inexact-ok + = tan tonearest binary32 0x8p-8 : 0x8.00aacp-8 : inexact-ok +diff --git a/sysdeps/ieee754/flt-32/s_tanf.c b/sysdeps/ieee754/flt-32/s_tanf.c +index dfe56fc2a0..5ee1d6f35e 100644 +--- a/sysdeps/ieee754/flt-32/s_tanf.c ++++ b/sysdeps/ieee754/flt-32/s_tanf.c +@@ -166,7 +166,7 @@ __tanf (float x) + uint32_t sgn = t >> 31; + for (int j = 0; j < array_length (st); j++) + { +- if (__glibc_unlikely (asfloat (st[j].arg) == ax)) ++ if (__glibc_unlikely (asuint (st[j].arg) == ax)) + { + if (sgn) + return -st[j].rh - st[j].rl; +-- +2.48.1 + diff --git a/tst-aarch64-pkey.patch b/tst-aarch64-pkey.patch new file mode 100644 index 0000000..8582ae9 --- /dev/null +++ b/tst-aarch64-pkey.patch @@ -0,0 +1,37 @@ +From 1e0e33e1b19a7634b364ac7b97c3c9612d5b776f Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Sat, 15 Feb 2025 11:08:33 +0100 +Subject: [PATCH] Fix tst-aarch64-pkey to handle ENOSPC as not supported + +The syscall pkey_alloc can return ENOSPC to indicate either that all +keys are in use or that the system runs in a mode in which memory +protection keys are disabled. In such case the test should not fail and +just return unsupported. + +This matches the behaviour of the generic tst-pkey. + +Reviewed-by: Adhemerval Zanella +Reviewed-by: Florian Weimer +(cherry picked from commit 60f2d6be657aa8c663ee14bd266d343ae0f35afb) +--- + sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c b/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c +index 3ff33ef72a..c884efc3b4 100644 +--- a/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c ++++ b/sysdeps/unix/sysv/linux/aarch64/tst-aarch64-pkey.c +@@ -55,6 +55,10 @@ do_test (void) + if (errno == ENOSYS || errno == EINVAL) + FAIL_UNSUPPORTED + ("kernel or CPU does not support memory protection keys"); ++ if (errno == ENOSPC) ++ FAIL_UNSUPPORTED ++ ("no keys available or kernel does not support memory" ++ " protection keys"); + FAIL_EXIT1 ("pkey_alloc: %m"); + } + +-- +2.48.1 +