guix_mirror_bot pushed a commit to branch core-packages-team in repository guix.
commit 5d90257c68e93e10938506cacf7fc1ed4fff05c3 Author: Zheng Junjie <[email protected]> AuthorDate: Sat Oct 24 14:00:59 2026 +0800 gnu: clang-runtime-13: Fix build with glibc 2.42+. * gnu/packages/patches/compiler-rt-13-remove-deprecated-struct-termio.patch: New patch * gnu/packages/llvm.scm (clang-runtime-13): Use it. --- gnu/packages/llvm.scm | 3 +- ...ler-rt-13-remove-deprecated-struct-termio.patch | 230 +++++++++++++++++++++ 2 files changed, 232 insertions(+), 1 deletion(-) diff --git a/gnu/packages/llvm.scm b/gnu/packages/llvm.scm index 56aefc4b782..c16fa392906 100644 --- a/gnu/packages/llvm.scm +++ b/gnu/packages/llvm.scm @@ -950,7 +950,8 @@ Library.") llvm-13 "1z2xr9nn4mgc3hn9ark2k5y4wznpk47xppkp63bcbagr6589acvv" '("clang-runtime-13-glibc-2.36-compat.patch" - "clang-13-remove-crypt-interceptors.patch"))) + "clang-13-remove-crypt-interceptors.patch" + "compiler-rt-13-remove-deprecated-struct-termio.patch"))) (define-public clang-13 (clang-from-llvm llvm-13 clang-runtime-13 diff --git a/gnu/packages/patches/compiler-rt-13-remove-deprecated-struct-termio.patch b/gnu/packages/patches/compiler-rt-13-remove-deprecated-struct-termio.patch new file mode 100644 index 00000000000..57500f2cb3d --- /dev/null +++ b/gnu/packages/patches/compiler-rt-13-remove-deprecated-struct-termio.patch @@ -0,0 +1,230 @@ +check-pick from upstream 59978b21ad9c65276ee8e14f26759691b8a65763 0a17483c481d82eace3b36aee9cacb619eb027af c99b1bcd505064f2e086e6b1034ce0b0c91ea5b9 commits + +Adjust for compiler-rt 13 + +From 59978b21ad9c65276ee8e14f26759691b8a65763 Mon Sep 17 00:00:00 2001 +From: Tom Stellard <[email protected]> +Date: Mon, 28 Apr 2025 13:45:11 -0700 +Subject: [PATCH] [sanitizer_common] Remove interceptors for deprecated struct + termio (#137403) + +This struct will be removed from glibc-2.42 and has been deprecated for +a very long time. + +Fixes #137321 +--- + .../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/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index f88f914b1d149..bc8f02826c614 100644 +--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -342,17 +342,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/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +index b4d87ab6228e5..7a89bf1c74985 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -494,9 +494,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/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +index 348bb4f27aec3..fdc52aa56c493 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -1063,7 +1063,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; +From 0a17483c481d82eace3b36aee9cacb619eb027af Mon Sep 17 00:00:00 2001 +From: cqwrteur <[email protected]> +Date: Fri, 25 Jul 2025 03:49:49 +0800 +Subject: [PATCH] [sanitizer] Remove usage of termios ioctl constants on Linux + glibc since 2.41 (#149140) + +glibc 2.42 made all usage of termios ioctl constants strictly internal + +Therefore, we remove all usage for those removed constants. + +This should only apply for Linux. + +Fix #149103 + +Reference: + +https://github.com/bminor/glibc/commit/3d3572f59059e2b19b8541ea648a6172136ec42e + +@fweimer-rh @tstellar +--- + .../sanitizer_common_interceptors_ioctl.inc | 4 ++++ + .../lib/sanitizer_common/sanitizer_platform.h | 15 +++++++++++++++ + .../sanitizer_platform_limits_posix.cpp | 4 ++++ + .../sanitizer_platform_limits_posix.h | 4 +++- + 4 files changed, 26 insertions(+), 1 deletion(-) + +diff --git a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +index 08c2be47f5358..673f284b6a043 100644 +--- a/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc +@@ -344,12 +344,16 @@ static void ioctl_table_fill() { + _(SOUND_PCM_WRITE_CHANNELS, WRITE, sizeof(int)); + _(SOUND_PCM_WRITE_FILTER, WRITE, sizeof(int)); + _(TCFLSH, NONE, 0); ++# if SANITIZER_TERMIOS_IOCTL_CONSTANTS + _(TCGETS, WRITE, struct_termios_sz); ++# endif + _(TCSBRK, NONE, 0); + _(TCSBRKP, NONE, 0); ++# if SANITIZER_TERMIOS_IOCTL_CONSTANTS + _(TCSETS, READ, struct_termios_sz); + _(TCSETSF, READ, struct_termios_sz); + _(TCSETSW, READ, struct_termios_sz); ++# endif + _(TCXONC, NONE, 0); + _(TIOCGLCKTRMIOS, WRITE, struct_termios_sz); + _(TIOCGSOFTCAR, WRITE, sizeof(int)); +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +index 7a89bf1c74985..ef4b8a85d6634 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -780,15 +780,19 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + #endif // SOUND_VERSION + unsigned IOCTL_TCFLSH = TCFLSH; + unsigned IOCTL_TCGETA = TCGETA; ++# if SANITIZER_TERMIOS_IOCTL_CONSTANTS + unsigned IOCTL_TCGETS = TCGETS; ++# endif + unsigned IOCTL_TCSBRK = TCSBRK; + unsigned IOCTL_TCSBRKP = TCSBRKP; + unsigned IOCTL_TCSETA = TCSETA; + unsigned IOCTL_TCSETAF = TCSETAF; + unsigned IOCTL_TCSETAW = TCSETAW; ++# if SANITIZER_TERMIOS_IOCTL_CONSTANTS + unsigned IOCTL_TCSETS = TCSETS; + unsigned IOCTL_TCSETSF = TCSETSF; + unsigned IOCTL_TCSETSW = TCSETSW; ++# endif + unsigned IOCTL_TCXONC = TCXONC; + unsigned IOCTL_TIOCGLCKTRMIOS = TIOCGLCKTRMIOS; + unsigned IOCTL_TIOCGSOFTCAR = TIOCGSOFTCAR; +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +index 00e237a24fc91..9e11dd9911d9d 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -1339,15 +1339,17 @@ extern unsigned IOCTL_SNDCTL_COPR_WCODE; + extern unsigned IOCTL_SNDCTL_COPR_WDATA; + extern unsigned IOCTL_TCFLSH; + extern unsigned IOCTL_TCGETA; +-extern unsigned IOCTL_TCGETS; + extern unsigned IOCTL_TCSBRK; + extern unsigned IOCTL_TCSBRKP; + extern unsigned IOCTL_TCSETA; + extern unsigned IOCTL_TCSETAF; + extern unsigned IOCTL_TCSETAW; ++# if SANITIZER_TERMIOS_IOCTL_CONSTANTS ++extern unsigned IOCTL_TCGETS; + extern unsigned IOCTL_TCSETS; + extern unsigned IOCTL_TCSETSF; + extern unsigned IOCTL_TCSETSW; ++# endif + extern unsigned IOCTL_TCXONC; + extern unsigned IOCTL_TIOCGLCKTRMIOS; + extern unsigned IOCTL_TIOCGSOFTCAR; +From c99b1bcd505064f2e086e6b1034ce0b0c91ea5b9 Mon Sep 17 00:00:00 2001 +From: Andreas Schwab <[email protected]> +Date: Wed, 7 May 2025 10:06:10 +0200 +Subject: [PATCH] Remove reference to obsolete termio ioctls +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +The termio ioctls are no longer used after commit 59978b21ad9c +("[sanitizer_common] Remove interceptors for deprecated struct termio +(#137403)"), remove them. Fixes this build error: + +../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:765:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ + 765 | unsigned IOCTL_TCGETA = TCGETA; + | ^~~~~~ +../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:769:27: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ + 769 | unsigned IOCTL_TCSETA = TCSETA; + | ^~~~~~ +../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:770:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ + 770 | unsigned IOCTL_TCSETAF = TCSETAF; + | ^~~~~~~ +../../../../libsanitizer/sanitizer_common/sanitizer_platform_limits_posix.cpp:771:28: error: invalid application of ‘sizeof’ to incomplete type ‘__sanitizer::termio’ + 771 | unsigned IOCTL_TCSETAW = TCSETAW; + | ^~~~~~~ +Part-of: https://github.com/llvm/llvm-project/pull/138822 +Closes: https://github.com/llvm/llvm-project/pull/138822 +--- + .../lib/sanitizer_common/sanitizer_platform_limits_posix.cpp | 4 ---- + .../lib/sanitizer_common/sanitizer_platform_limits_posix.h | 4 ---- + 2 files changed, 8 deletions(-) + +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +index ef4b8a85d6634..ea8cc306268cb 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -779,15 +779,11 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr); + unsigned IOCTL_SOUND_PCM_WRITE_FILTER = SOUND_PCM_WRITE_FILTER; + #endif // SOUND_VERSION + unsigned IOCTL_TCFLSH = TCFLSH; +- unsigned IOCTL_TCGETA = TCGETA; + # if SANITIZER_TERMIOS_IOCTL_CONSTANTS + unsigned IOCTL_TCGETS = TCGETS; + # endif + unsigned IOCTL_TCSBRK = TCSBRK; + unsigned IOCTL_TCSBRKP = TCSBRKP; +- unsigned IOCTL_TCSETA = TCSETA; +- unsigned IOCTL_TCSETAF = TCSETAF; +- unsigned IOCTL_TCSETAW = TCSETAW; + # if SANITIZER_TERMIOS_IOCTL_CONSTANTS + unsigned IOCTL_TCSETS = TCSETS; + unsigned IOCTL_TCSETSF = TCSETSF; +diff --git a/lib/sanitizer_common/sanitizer_platform_limits_posix.h b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +index 9e11dd9911d9d..24966523f3a02 100644 +--- a/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -1338,12 +1338,8 @@ extern unsigned IOCTL_SNDCTL_COPR_SENDMSG; + extern unsigned IOCTL_SNDCTL_COPR_WCODE; + extern unsigned IOCTL_SNDCTL_COPR_WDATA; + extern unsigned IOCTL_TCFLSH; +-extern unsigned IOCTL_TCGETA; + extern unsigned IOCTL_TCSBRK; + extern unsigned IOCTL_TCSBRKP; +-extern unsigned IOCTL_TCSETA; +-extern unsigned IOCTL_TCSETAF; +-extern unsigned IOCTL_TCSETAW; + # if SANITIZER_TERMIOS_IOCTL_CONSTANTS + extern unsigned IOCTL_TCGETS; + extern unsigned IOCTL_TCSETS;
