diff options
author | Ludovic Courtès <ludo@gnu.org> | 2024-08-22 13:56:21 +0200 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2024-08-31 10:45:48 +0200 |
commit | 2c51202a2a803853cf9844c6169087628d098955 (patch) | |
tree | dbdf88059a03a8b19418287476cf421ce314a421 /gnu/packages/patches | |
parent | 7cedba32486677ecace9fab3194917719b7438be (diff) |
gnu: make-bootstrap: Ensure libm.a provides ‘fmod’ on i686.
Fixes <https://issues.guix.gnu.org/72725>.
* gnu/packages/make-bootstrap.scm (glibc-for-bootstrap)[arguments]: Add
‘apply-libm-patch’ on i686.
* gnu/packages/patches/glibc-2.39-fmod-libm-a.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
Reported-by: Ricardo Wurmus <rekado@elephly.net>
Change-Id: Iaffba0a9f424d8d80a8a5611df2d285d7d632d99
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/glibc-2.39-fmod-libm-a.patch | 98 |
1 files changed, 98 insertions, 0 deletions
diff --git a/gnu/packages/patches/glibc-2.39-fmod-libm-a.patch b/gnu/packages/patches/glibc-2.39-fmod-libm-a.patch new file mode 100644 index 00000000000..91b1871beee --- /dev/null +++ b/gnu/packages/patches/glibc-2.39-fmod-libm-a.patch @@ -0,0 +1,98 @@ +Fixes lack of 'fmod' in libm.a on i686-linux: + + https://sourceware.org/bugzilla/show_bug.cgi?id=31488 + https://issues.guix.gnu.org/72725 + +commit 0b716305dfb48c2d13ed4f7d06c082b90c1d226f +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) + +diff --git a/sysdeps/i386/fpu/w_fmod_compat.c b/sysdeps/i386/fpu/w_fmod_compat.c +index 5ac9995ffd..528bfc2a13 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 cc417e07d3..5a61693e51 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 1afbe7d8ad..932cc4341c 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 527d4fbed2..57f38091e6 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 5043586b91..88db07f443 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 |