Upgrade glibc to 2.42
cover Upgrade glibc to 2.42
Hello,
Here is a small patch series bumping glibc to 2.42. I would probably recommend to *not* merge this into master right now, but rather merge it in next. Indeed, they removed termio.h, and this is likely to cause some amount of breakage here and there. Even gcc had to be fixed because of this.
So I believe we probably want to release 2025.08 with the existing glibc 2.41, and bite the glibc 2.42 bullet for our 2025.11 release.
Best regards,
Thomas
Thomas Petazzoni (2):
package/gcc: backport upstream fix for glibc 2.42 build package/{glibc,localdef}: bump to version 2.42
...bsanitizer-Fix-build-with-glibc-2.42.patch | 81 +++++++++++++++++++ ...bsanitizer-Fix-build-with-glibc-2.42.patch | 81 +++++++++++++++++++ ...bsanitizer-Fix-build-with-glibc-2.42.patch | 81 +++++++++++++++++++ package/glibc/glibc.hash | 2 +- package/glibc/glibc.mk | 2 +- ...ACK-only-build-and-install-localedef.patch | 8 +- ...y-on-GCC-to-4.8-and-binutils-to-2.24.patch | 14 ++-- ...3_SOURCE-undefined-to-build-localede.patch | 10 +-- package/localedef/localedef.mk | 2 +- 9 files changed, 262 insertions(+), 19 deletions(-) create mode 100644 package/gcc/13.4.0/0004-libsanitizer-Fix-build-with-glibc-2.42.patch create mode 100644 package/gcc/14.3.0/0003-libsanitizer-Fix-build-with-glibc-2.42.patch create mode 100644 package/gcc/15.1.0/0002-libsanitizer-Fix-build-with-glibc-2.42.patch
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 1/2 package/gcc: backport upstream fix for glibc 2.42 build
glibc 2.42 drops <termio.h>, so the libsanitizer code needs to be adjusted accordingly, by backporting upstream gcc fixes.
--- ...bsanitizer-Fix-build-with-glibc-2.42.patch | 81 +++++++++++++++++++ ...bsanitizer-Fix-build-with-glibc-2.42.patch | 81 +++++++++++++++++++ ...bsanitizer-Fix-build-with-glibc-2.42.patch | 81 +++++++++++++++++++ 3 files changed, 243 insertions(+) create mode 100644 package/gcc/13.4.0/0004-libsanitizer-Fix-build-with-glibc-2.42.patch create mode 100644 package/gcc/14.3.0/0003-libsanitizer-Fix-build-with-glibc-2.42.patch create mode 100644 package/gcc/15.1.0/0002-libsanitizer-Fix-build-with-glibc-2.42.patch
package/gcc/13.4.0/0004-libsanitizer-Fix-build-with-glibc-2.42.patch new file +81 -0
@@ -0,0 +1,81 @@ +From d32ece49d32b00448d967e7dbc6900fb25cbc775 Mon Sep 17 00:00:00 2001 +From: Florian Weimer <[email protected]> +Date: Fri, 2 May 2025 17:41:43 +0200 +Subject: [PATCH] libsanitizer: Fix build with glibc 2.42 + +The termio structure will be removed from glibc 2.42. It has +been deprecated since the late 80s/early 90s. + +Cherry-picked from LLVM commit 59978b21ad9c65276ee8e14f26759691b8a65763 +("[sanitizer_common] Remove interceptors for deprecated struct termio +(#137403)"). + +Co-Authored-By: Tom Stellard <[email protected]> + +libsanitizer/ + + * sanitizer_common/sanitizer_common_interceptors_ioctl.inc: Cherry + picked from LLVM commit 59978b21ad9c65276ee8e14f26759691b8a65763. + * sanitizer_common/sanitizer_platform_limits_posix.cpp: Likewise. + * sanitizer_common/sanitizer_platform_limits_posix.h: Likewise. + +Upstream: 1789c57dc97ea2f9819ef89e28bf17208b6208e7 (gcc master branch) +Upstream: d32ece49d32b00448d967e7dbc6900fb25cbc775 (gcc 15.x branch) +Signed-off-by: Thomas Petazzoni <[email protected]> +--- + .../sanitizer_common_interceptors_ioctl.inc | 8 -------- + .../sanitizer_common/sanitizer_platform_limits_posix.cpp | 3 --- + .../sanitizer_common/sanitizer_platform_limits_posix.h | 1 - + 3 files changed, 12 deletions(-) + +diff --git a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index 49ec4097c90..dda11daa77f 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -338,17 +338,9 @@ static void ioctl_table_fill() { + _(SOUND_PCM_WRITE_CHANNELS, WRITE, sizeof(int)); + _(SOUND_PCM_WRITE_FILTER, WRITE, sizeof(int)); + _(TCFLSH, NONE, 0); +-#if SANITIZER_GLIBC +- _(TCGETA, WRITE, struct_termio_sz); +-#endif + _(TCGETS, WRITE, struct_termios_sz); + _(TCSBRK, NONE, 0); + _(TCSBRKP, NONE, 0); +-#if SANITIZER_GLIBC +- _(TCSETA, READ, struct_termio_sz); +- _(TCSETAF, READ, struct_termio_sz); +- _(TCSETAW, READ, struct_termio_sz); +-#endif + _(TCSETS, READ, struct_termios_sz); + _(TCSETSF, READ, struct_termios_sz); + _(TCSETSW, READ, struct_termios_sz); +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +index c87d5ef42c9..7bbc6f2edac 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -485,9 +485,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned struct_input_id_sz = sizeof(struct input_id); + unsigned struct_mtpos_sz = sizeof(struct mtpos); + unsigned struct_rtentry_sz = sizeof(struct rtentry); +-#if SANITIZER_GLIBC || SANITIZER_ANDROID +- unsigned struct_termio_sz = sizeof(struct termio); +-#endif + unsigned struct_vt_consize_sz = sizeof(struct vt_consize); + unsigned struct_vt_sizes_sz = sizeof(struct vt_sizes); + unsigned struct_vt_stat_sz = sizeof(struct vt_stat); +diff --git a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +index c07f7cd0b0d..a80df656826 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -1029,7 +1029,6 @@ extern unsigned struct_hd_geometry_sz; + extern unsigned struct_input_absinfo_sz; + extern unsigned struct_input_id_sz; + extern unsigned struct_mtpos_sz; +-extern unsigned struct_termio_sz; + extern unsigned struct_vt_consize_sz; + extern unsigned struct_vt_sizes_sz; + extern unsigned struct_vt_stat_sz; +-- +2.50.1 +
package/gcc/14.3.0/0003-libsanitizer-Fix-build-with-glibc-2.42.patch new file +81 -0
81 lines not on this page · raw message
package/gcc/15.1.0/0002-libsanitizer-Fix-build-with-glibc-2.42.patch new file +81 -0
81 lines not on this page · raw message
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Re: [Buildroot] [PATCH 1/2] package/gcc: backport upstream fix for glibc 2.42 build
Quoted 4 lines · Thomas Petazzoni via buildroot
glibc 2.42 drops <
termio.h>, so the libsanitizer code needs to be adjusted accordingly, by backporting upstream gcc fixes.Signed-off-by Thomas Petazzoni <[email protected]>
Series applied to next, thanks.
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
PATCH 2/2 package/{glibc, localdef}: bump to version 2.42
In reply to Thomas Petazzoni via buildrootRelease e-mail:
https://inbox.sourceware.org/libc-alpha/5906001.DvuYhMxLoT@pinacolada/
Major new features:
* The following ISO C23 function families (introduced in TS 18661-4:2015) are now supported in <math.h>. Each family includes functions for float, double, long double, _FloatN and _FloatNx, and a type-generic macro in <tgmath.h>.
- Power and absolute-value functions: compoundn, pown, powr, rootn, rsqrt.
* On Linux, the pthread_gettid_np function has been added.
* The ISO C2Y family of unsigned abs functions, i.e. uabs, ulabs, ullabs, and uimaxabs, is now supported.
* On Linux, the <termios.h> interface now supports arbitrary baud rates; speed_t is redefined to simply be the baud rate specified as an unsigned int, which matches the kernel interface.
* The thread-local cache in malloc (tcache) now supports caching of large blocks. This feature can be enabled by setting the tunable glibc.malloc.tcache_max to a larger value (max 4194304). Tcache is also significantly faster for small sizes.
* A new configure option, "--enable-sframe", can be used to enable SFrame support of the GNU C Libraries. SFrame is a new stack trace information format which can be used by backtrace. It requires binutils with a minimum version of 2.45.
* Support for lightweight stack guard pages via madvise and the MADV_GUARD_INSTALL flag has been added to pthread_create.
* Additional optimized and correctly rounded mathematical functions have been imported from the CORE-MATH project, in particular acospif, asinpif, atanpif, atan2pif, cospif, sinpif, tanpif.
* The testsuite has been significantly extended, including coverage of the functionality of the printf and scanf function families in many variants.
* The manual has been significantly extended and updated, particularly the threads, terminal, filesystem, resource, and math chapters.
* Code has been added to detect the x86-64 Intel Arrow Lake, Panther Lake, Clearwater Forest, and Diamond Rapids microarchitectures.
* Regarding S390, support for the new z17 platform has been added.
Deprecated and removed features, and other changes affecting compatibility:
* The glibc.rtld.execstack tunable now supports a compatibility mode to allow programs that require an executable stack through dynamically loaded shared libraries.
* On Linux, the <termio.h> header and the definition of struct termio in <sys/ioctl.h> have been removed. The termio interface has been obsolete since the very first version of POSIX.1 in 1988, replaced with <termios.h>.
* The support for TX lock elision of pthread mutexes has been deprecated on all architectures and will be removed in the next release.
* On AArch64 Linux targets supporting the Scalable Matrix Extension (SME), setjmp and sigsetjmp will disable the ZA state of SME.
Changes to build and runtime requirements:
* GCC 12.1 or later is now required to build the GNU C Library.
* GNU Binutils 2.39 or later is now required to build the GNU C Library.
--- package/glibc/glibc.hash | 2 +- package/glibc/glibc.mk | 2 +- ...001-HACK-only-build-and-install-localedef.patch | 8 ++++---- ...ndency-on-GCC-to-4.8-and-binutils-to-2.24.patch | 14 +++++++------- ...ISOC23_SOURCE-undefined-to-build-localede.patch | 10 +++++----- package/localedef/localedef.mk | 2 +- 6 files changed, 19 insertions(+), 19 deletions(-)
package/glibc/glibc.hash +1 -1
@@ -1,5 +1,5 @@ # Locally calculated (fetched from Github) -sha256 ed2cd1f058f22f682e700c5be408975db62025a14863a5a6700ee93d5927504e glibc-2.41-5-gcb7f20653724029be89224ed3a35d627cc5b4163.tar.gz +sha256 a364a548ebda9c570f5bf62bf5e4ad3240a90056455b9edfbf1472a7254bd1c0 glibc-2.42-3-gbc13db73937730401d592b33092db6df806d193e.tar.gz # Hashes for license files sha256 8177f97513213526df2cf6184d8ff986c675afb514d4e68a404010521b880643 COPYING
package/glibc/glibc.mk +1 -1
@@ -7,7 +7,7 @@ # Generate version string using: # git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2- # When updating the version, please also update localedef -GLIBC_VERSION = 2.41-5-gcb7f20653724029be89224ed3a35d627cc5b4163 +GLIBC_VERSION = 2.42-3-gbc13db73937730401d592b33092db6df806d193e # Upstream doesn't officially provide an https download link. # There is one (https://sourceware.org/git/glibc.git) but it's not reliable,
package/localedef/0001-HACK-only-build-and-install-localedef.patch +4 -4
@@ -1,4 +1,4 @@ -From b90ae9abee7e5cc3a92b053f00db959c853a745e Mon Sep 17 00:00:00 2001 +From a3006d23a58d825dcaa4863ce81a454e151d038d Mon Sep 17 00:00:00 2001 From: Michael Olbrich <[email protected]> Date: Mon, 21 May 2018 16:45:02 +0200 Subject: [PATCH] HACK: only build and install localedef
@@ -17,10 +17,10 @@ Signed-off-by: Yann E. MORIN <[email protected]> 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Rules b/Rules -index c8adc00008..4acf69790f 100644 +index 44c041c491..156c82619b 100644 --- a/Rules +++ b/Rules -@@ -234,10 +234,16 @@ binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \ +@@ -239,10 +239,16 @@ binaries-shared-notests = $(filter-out $(binaries-pie) $(binaries-static), \ $(binaries-all-notests)) ifneq "$(strip $(binaries-shared-notests))" ""
@@ -70,5 +70,5 @@ index 9d9c1a7691..4d26032c15 100644 libBrokenLocale-routines = broken_cur_max -- -2.48.1 +2.50.1
package/localedef/0002-relax-dependency-on-GCC-to-4.8-and-binutils-to-2.24.patch +7 -7
@@ -1,4 +1,4 @@ -From df211e396f3a2183eed33dc3ac05ecea6bc16f0a Mon Sep 17 00:00:00 2001 +From 2cb626348a64846b836a878ab7fc93f54eb0afd6 Mon Sep 17 00:00:00 2001 From: Matt Weber <[email protected]> Date: Thu, 6 Feb 2020 14:36:21 -0600 Subject: [PATCH] relax dependency on GCC to 4.8 and binutils to 2.24
@@ -35,27 +35,27 @@ Signed-off-by: Yann E. MORIN <[email protected]> 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure -index eb8abd0054..24abd55594 100755 +index 180e49d95b..fdb19d1d27 100755 --- a/configure +++ b/configure -@@ -5329,7 +5329,7 @@ printf %s "checking version of $LD... " >&6; } +@@ -5352,7 +5352,7 @@ printf %s "checking version of $LD... " >&6; } ac_prog_version=`$LD --version 2>&1 | sed -n 's/^.*GNU ld.* \([0-9][0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; -- 2.1[0-9][0-9]*|2.2[5-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) +- 2.[1-9][0-9][0-9]*|2.39*|2.[4-9][0-9]*|[3-9].*|[1-9][0-9]*) + 2.1[0-9][0-9]*|2.2[4-9]*|2.[3-9][0-9]*|[3-9].*|[1-9][0-9]*) ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; -@@ -5777,7 +5777,7 @@ int +@@ -5801,7 +5801,7 @@ int main (void) { --#if !defined __GNUC__ || __GNUC__ < 6 || (__GNUC__ == 6 && __GNUC_MINOR__ < 2) +-#if !defined __GNUC__ || __GNUC__ < 12 || (__GNUC__ == 12 && __GNUC_MINOR__ < 1) +#if !defined __GNUC__ || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 8) #error insufficient compiler #endif ; -- -2.48.1 +2.50.1
package/localedef/0003-HACK-keep-_ISOC23_SOURCE-undefined-to-build-localede.patch +5 -5
@@ -1,8 +1,8 @@ -From 7f52329793c88260260631593c9bc558b7eb01f8 Mon Sep 17 00:00:00 2001 +From c01b78e37885c7c4a191f752dc346c848d73b731 Mon Sep 17 00:00:00 2001 From: Romain Naour <[email protected]> Date: Sat, 9 Sep 2023 23:58:50 +0200 -Subject: [PATCH] HACK: keep _ISOC23_SOURCE undefined to build localedef with - old glibc +Subject: [PATCH] HACK: keep _ISOC23_SOURCE undefined to build localedef + with old glibc Fixes: host-localedef-2.38-13-g92201f16cbcfd9eafe314ef6654be2ea7ba25675/build/locale/ld-ctype.o: in function `ctype_read':
@@ -19,7 +19,7 @@ Signed-off-by: Thomas Petazzoni <[email protected]> 1 file changed, 2 deletions(-) diff --git a/include/features.h b/include/features.h -index 44bc4bbc85..c856368a71 100644 +index 8515b06b36..9abd65af93 100644 --- a/include/features.h +++ b/include/features.h @@ -217,9 +217,7 @@
@@ -33,5 +33,5 @@ index 44bc4bbc85..c856368a71 100644 # define _POSIX_SOURCE 1 # undef _POSIX_C_SOURCE -- -2.48.1 +2.50.1
package/localedef/localedef.mk +1 -1
@@ -7,7 +7,7 @@ # Use the same VERSION and SITE as target glibc # As in glibc.mk, generate version string using: # git describe --match 'glibc-*' --abbrev=40 origin/release/MAJOR.MINOR/master | cut -d '-' -f 2- -LOCALEDEF_VERSION = 2.41-5-gcb7f20653724029be89224ed3a35d627cc5b4163 +LOCALEDEF_VERSION = 2.42-3-gbc13db73937730401d592b33092db6df806d193e LOCALEDEF_SOURCE = glibc-$(LOCALEDEF_VERSION).tar.gz LOCALEDEF_SITE = $(call github,bminor,glibc,$(LOCALEDEF_VERSION)) HOST_LOCALEDEF_DL_SUBDIR = glibc
Signature · 6 lines
2.50.1 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot