From be828f7112a8a3d9eb7c7c8e9bd18f35e5ba5d30 Mon Sep 17 00:00:00 2001 From: Itai Ferber Date: Fri, 12 Dec 2025 17:59:29 -0500 Subject: [PATCH] dev-lang/swift: patch additional missing include 23ea96bd5 added a patch to fix some issues caused by build system updates; namely, it added some necessary `#include `s that allowed the project to build. Swift 6.2 requires an additional include in `FunctionRefInfo.cpp`. Signed-off-by: Itai Ferber --- ...ssues-caused-by-build-system-updates.patch | 97 ++++++++++++++++++- 1 file changed, 96 insertions(+), 1 deletion(-) mode change 120000 => 100644 dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch diff --git a/dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch b/dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch deleted file mode 120000 index 99532a8e61..0000000000 --- a/dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch +++ /dev/null @@ -1 +0,0 @@ -../swift-6.1.3/fix-issues-caused-by-build-system-updates.patch \ No newline at end of file diff --git a/dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch b/dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch new file mode 100644 index 0000000000..53be2cb654 --- /dev/null +++ b/dev-lang/swift/files/swift-6.2/fix-issues-caused-by-build-system-updates.patch @@ -0,0 +1,96 @@ +From: Pavel Sobolev +Subject: [PATCH] Fix issues caused by build system updates. + +This includes fixes for issues caused by the following updates: + +- GCC 15 (specifically, changes in libstdc++) +- GNU libc C library 2.42 + +Specifically, the following is changed: + +- Added missing includes of the `` header [1] +- Removed deprecated `struct termio` [2] +- Removed a redundant include of the `` header [3] + +[1] See https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=3a817a4a5a6d94da9127af3be9f84a74e3076ee2 +[2] See https://github.com/swiftlang/llvm-project/commit/59978b21ad9c65276ee8e14f26759691b8a65763 +[3] See https://github.com/swiftlang/swift/issues/81774 + +Bug: https://bugs.gentoo.org/945025 + +Signed-off-by: Pavel Sobolev + +--- a/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_common_interceptors_ioctl.inc ++++ b/llvm-project/compiler-rt/lib/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); +--- a/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -479,9 +479,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); +--- a/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h ++++ b/llvm-project/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.h +@@ -1013,7 +1013,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; +--- a/swift/lib/AST/FunctionRefInfo.cpp ++++ b/swift/lib/AST/FunctionRefInfo.cpp +@@ -14,6 +14,7 @@ + // + //===----------------------------------------------------------------------===// + ++#include + #include "swift/AST/FunctionRefInfo.h" + #include "swift/AST/DeclNameLoc.h" + #include "swift/AST/Identifier.h"/// itself is available in wasi-libc, but it's just a stub that doesn't actually +--- a/swift/stdlib/include/llvm/ADT/SmallVector.h ++++ b/swift/stdlib/include/llvm/ADT/SmallVector.h +@@ -22,6 +22,7 @@ + #include + #include + #include ++#include + #include + #include + #include +--- a/swift-foundation/Sources/_FoundationCShims/include/_CStdlib.h ++++ b/swift-foundation/Sources/_FoundationCShims/include/_CStdlib.h +@@ -51,10 +51,6 @@ + #include + #endif + +-#if __has_include() +-#include +-#endif +- + #if __has_include() + /// Guard against including `signal.h` on WASI. The `signal.h` header file