guix_mirror_bot pushed a commit to branch core-packages-team in repository guix.
commit 3f2fbe84b3e0a6342e947a0e2f98856ce3b993f5 Author: Zheng Junjie <[email protected]> AuthorDate: Sat Sep 19 20:35:23 2026 +0800 gnu: gcc-11: Fix build with glibc 2.42. * gnu/packages/patches/gcc-11-libsanitizer-Fix-build-with-glibc-2.42.patch: New patch. * gnu/local.mk (dist_patch_DATA): Register it. * gnu/packages/gcc.scm (gcc-11)[source]: Use patches. --- gnu/local.mk | 1 + gnu/packages/gcc.scm | 4 +- ...11-libsanitizer-Fix-build-with-glibc-2.42.patch | 72 ++++++++++++++++++++++ 3 files changed, 76 insertions(+), 1 deletion(-) diff --git a/gnu/local.mk b/gnu/local.mk index ed0122a888b..9a8dc517859 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1434,6 +1434,7 @@ dist_patch_DATA = \ %D%/packages/patches/gcc-12-strmov-store-file-names.patch \ %D%/packages/patches/gcc-10-cross-environment-variables.patch \ %D%/packages/patches/gcc-10-libsanitizer-no-crypt.patch \ + %D%/packages/patches/gcc-11-libsanitizer-Fix-build-with-glibc-2.42.patch \ %D%/packages/patches/gcc-11-libstdc++-hurd-libpthread.patch \ %D%/packages/patches/gcc-12-cross-environment-variables.patch \ %D%/packages/patches/gcc-11-libstdc++-powerpc.patch \ diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index eca8b5fe5a3..8a88961e99b 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -931,7 +931,9 @@ It also includes runtime support libraries for these languages.") "gcc-5.0-libvtv-runpath.patch" "gcc-10-libsanitizer-no-crypt.patch" "gcc-11-libstdc++-hurd-libpthread.patch" - "gcc-libstdc++-newer-gcc.patch")) + "gcc-libstdc++-newer-gcc.patch" + "gcc-11-libsanitizer-Fix-build-with-glibc-2.42.patch" + "gcc-sanitizer_common-Remove-reference-to-obsolete-termio-ioctls.patch")) (modules '((guix build utils))) (snippet gcc-canadian-cross-objdump-snippet))) (arguments diff --git a/gnu/packages/patches/gcc-11-libsanitizer-Fix-build-with-glibc-2.42.patch b/gnu/packages/patches/gcc-11-libsanitizer-Fix-build-with-glibc-2.42.patch new file mode 100644 index 00000000000..ea887f0f4d6 --- /dev/null +++ b/gnu/packages/patches/gcc-11-libsanitizer-Fix-build-with-glibc-2.42.patch @@ -0,0 +1,72 @@ +patch from https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=1789c57dc97ea2f9819ef89e28bf17208b6208e7 + +Adjust it to match gcc-11 + +From 1789c57dc97ea2f9819ef89e28bf17208b6208e7 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. +--- + .../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 49ec4097c900..dda11daa77f4 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/libsanitizer/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -338,13 +338,9 @@ static void ioctl_table_fill() { + _(SOUND_PCM_WRITE_CHANNELS, WRITE, sizeof(int)); + _(SOUND_PCM_WRITE_FILTER, WRITE, sizeof(int)); + _(TCFLSH, NONE, 0); +- _(TCGETA, WRITE, struct_termio_sz); + _(TCGETS, WRITE, struct_termios_sz); + _(TCSBRK, NONE, 0); + _(TCSBRKP, NONE, 0); +- _(TCSETA, READ, struct_termio_sz); +- _(TCSETAF, READ, struct_termio_sz); +- _(TCSETAW, READ, struct_termio_sz); + _(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 c87d5ef42c92..7bbc6f2edac2 100644 +--- a/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -485,7 +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); +- unsigned struct_termio_sz = sizeof(struct termio); + 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 c07f7cd0b0d0..a80df656826e 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;
