glibc/glibc-upstream-2.39-77.patch
Arjun Shankar 2118accf25 Sync with glibc-2.39-22.fc40 (RHEL-45522)
Resolves: RHEL-45522

Fedora 40 commit: 9404e14f4d
Upstream commit: 4bdcc1963bc2b5ba5f8e319e402d9eb2cb6096c1

Fedora 40 changes:

- Backport /etc/resolv.conf enhancements to thelp with RHEL-18039 testing

Related: RHEL-50663

- Support --without testsuite builds without perl installed (#2292195)
- Use release instead of baserelease for glibc32 conflict
- Add Conflicts:/Obsoletes: for glibc32 to glibc.i686

- ppc64le: Build early startup code with -mcpu=power8

Resolves: RHEL-43456

- Move ANSI_X3.110-1983 support from main package to glibc-gconv-extra.

Resolves: RHEL-41206

Upstream changes:

- manual: make setrlimit() description less ambiguous
- manual/stdio: Clarify putc and putwc
- malloc: add multi-threaded tests for aligned_alloc/calloc/malloc
- malloc: avoid global locks in tst-aligned_alloc-lib.c

- resolv: Track single-request fallback via _res._flags (bug 31476)
- resolv: Do not wait for non-existing second DNS response after error (bug 30081)
- resolv: Allow short error responses to match any query (bug 31890)

Resolves: RHEL-50663

- elf: Fix localplt.awk for DT_RELR-enabled builds (BZ 31978)
- Fix usage of _STACK_GROWS_DOWN and _STACK_GROWS_UP defines [BZ 31989]
- Linux: Make __rseq_size useful for feature detection (bug 31965)
- elf: Make dl-rseq-symbols Linux only
- nptl: fix potential merge of __rseq_* relro symbols

- s390x: Fix segfault in wcsncmp [BZ #31934]

Resolves: RHEL-49488

- stdlib: fix arc4random fallback to /dev/urandom (BZ 31612)
- math: Provide missing math symbols on libc.a (BZ 31781)
- math: Fix isnanf128 static build (BZ 31774)
- math: Fix i386 and m68k exp10 on static build (BZ 31775)
- math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488)
- posix: Fix pidfd_spawn/pidfd_spawnp leak if execve fails (BZ 31695)
2024-08-14 17:57:11 +02:00

108 lines
3.6 KiB
Diff

commit 6cb25aff8583421cf7a55ddd40abd7bd49176c60
Author: Adhemerval Zanella <adhemerval.zanella@linaro.org>
Date: Thu Mar 14 14:59:35 2024 -0300
math: Fix i386 and m68k fmod/fmodf on static build (BZ 31488)
The commit 16439f419b removed the static fmod/fmodf on i386 and m68k
with and empty w_fmod.c (required for the ABIs that uses the newly
implementation). This patch fixes by adding the required symbols on
the arch-specific w_fmod{f}_compat.c implementation.
To statically build fmod fails on some ABI (alpha, s390, sparc) because
it does not export the ldexpf128, this is also fixed by this patch.
Checked on i686-linux-gnu and with a build for m68k-linux-gnu.
Reviewed-by: Aurelien Jarno <aurelien@aurel32.net>
Tested-by: Aurelien Jarno <aurelien@aurel32.net>
(cherry picked from commit 0b716305dfb48c2d13ed4f7d06c082b90c1d226f)
diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c
index 5ac9995ffd862a7f..528bfc2a135b5251 100644
--- a/sysdeps/i386/fpu/w_fmod_compat.c
+++ b/sysdeps/i386/fpu/w_fmod_compat.c
@@ -7,8 +7,9 @@
# define LIBM_SVID_COMPAT 1
# undef compat_symbol
# define compat_symbol(a, b, c, d)
-#endif
-#include <math/w_fmod_compat.c>
-#ifdef SHARED
+# include <math/w_fmod_compat.c>
libm_alias_double (__fmod_compat, fmod)
+#else
+#include <math-type-macros-double.h>
+#include <w_fmod_template.c>
#endif
diff --git a/sysdeps/i386/fpu/w_fmodf_compat.c b/sysdeps/i386/fpu/w_fmodf_compat.c
index cc417e07d39b271d..5a61693e51f98f8f 100644
--- a/sysdeps/i386/fpu/w_fmodf_compat.c
+++ b/sysdeps/i386/fpu/w_fmodf_compat.c
@@ -7,8 +7,9 @@
# define LIBM_SVID_COMPAT 1
# undef compat_symbol
# define compat_symbol(a, b, c, d)
-#endif
-#include <math/w_fmodf_compat.c>
-#ifdef SHARED
+# include <math/w_fmodf_compat.c>
libm_alias_float (__fmod_compat, fmod)
+#else
+#include <math-type-macros-float.h>
+#include <w_fmod_template.c>
#endif
diff --git a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
index 1afbe7d8adbb00ae..932cc4341c53dec3 100644
--- a/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
+++ b/sysdeps/ieee754/ldbl-opt/s_ldexpl.c
@@ -17,13 +17,13 @@
License along with the GNU C Library; if not, see
<https://www.gnu.org/licenses/>. */
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
# define declare_mgen_alias(f,t)
#endif
#include <math-type-macros-ldouble.h>
#include <s_ldexp_template.c>
-#if IS_IN (libc)
+#if IS_IN (libc) && defined SHARED
long_double_symbol (libc, __ldexpl, ldexpl);
long_double_symbol (libc, __wrap_scalbnl, scalbnl);
#endif
diff --git a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c
index 527d4fbed201d4b4..57f38091e6724848 100644
--- a/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c
+++ b/sysdeps/m68k/m680x0/fpu/w_fmod_compat.c
@@ -7,8 +7,9 @@
# define LIBM_SVID_COMPAT 1
# undef compat_symbol
# define compat_symbol(a, b, c, d)
-#endif
#include <math/w_fmod_compat.c>
-#ifdef SHARED
libm_alias_double (__fmod_compat, fmod)
+#else
+#include <math-type-macros-double.h>
+#include <w_fmod_template.c>
#endif
diff --git a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c
index 5043586b910e765f..88db07f443b0c339 100644
--- a/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c
+++ b/sysdeps/m68k/m680x0/fpu/w_fmodf_compat.c
@@ -7,8 +7,9 @@
# define LIBM_SVID_COMPAT 1
# undef compat_symbol
# define compat_symbol(a, b, c, d)
-#endif
-#include <math/w_fmodf_compat.c>
-#ifdef SHARED
+# include <math/w_fmodf_compat.c>
libm_alias_float (__fmod_compat, fmod)
+#else
+#include <math-type-macros-float.h>
+#include <w_fmod_template.c>
#endif