dev-lang/swift: remove #include <linux/scc.h>

This header was removed recently (looks like with Linux 7.1).
Remove the usage for it in libsanitizer so that it builds again.

See https://github.com/llvm/llvm-project/issues/194110.

Signed-off-by: Katalin Rebhan <me@dblsaiko.net>
This commit is contained in:
Katalin Rebhan
2026-07-01 02:28:24 +02:00
parent 6c6ce80243
commit 731832ced0
12 changed files with 34 additions and 0 deletions

View File

@@ -0,0 +1,23 @@
Based off of Swift 6.3.2 sources.
diff --git 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
index ea8cc30..88eccec 100644
--- 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
@@ -157,7 +157,6 @@ typedef struct user_fpregs elf_fpregset_t;
#include <linux/lp.h>
#include <linux/mroute.h>
#include <linux/mroute6.h>
-#include <linux/scc.h>
#include <linux/serial.h>
#include <sys/msg.h>
#include <sys/ipc.h>
@@ -532,8 +531,6 @@ unsigned struct_ElfW_Phdr_sz = sizeof(Elf_Phdr);
unsigned struct_kbsentry_sz = sizeof(struct kbsentry);
unsigned struct_mtconfiginfo_sz = sizeof(struct mtconfiginfo);
unsigned struct_nr_parms_struct_sz = sizeof(struct nr_parms_struct);
- unsigned struct_scc_modem_sz = sizeof(struct scc_modem);
- unsigned struct_scc_stat_sz = sizeof(struct scc_stat);
unsigned struct_serial_multiport_struct_sz
= sizeof(struct serial_multiport_struct);
unsigned struct_serial_struct_sz = sizeof(struct serial_struct);

View File

@@ -0,0 +1 @@
../swift-5.10.1-r5/sanitizer-remove-scc.patch

View File

@@ -0,0 +1 @@
../swift-6.0.3-r2/sanitizer-remove-scc.patch

View File

@@ -0,0 +1 @@
../swift-6.1.3/sanitizer-remove-scc.patch

View File

@@ -0,0 +1 @@
../swift-6.2.4/sanitizer-remove-scc.patch

View File

@@ -59,6 +59,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/lldb-cmake-minimum-version.patch" "${FILESDIR}/${PF}/lldb-cmake-minimum-version.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"

View File

@@ -59,6 +59,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"

View File

@@ -61,6 +61,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"

View File

@@ -62,6 +62,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"

View File

@@ -64,6 +64,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"

View File

@@ -64,6 +64,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"

View File

@@ -64,6 +64,7 @@ PATCHES=(
"${FILESDIR}/${PF}/link-ncurses-tinfo.patch" "${FILESDIR}/${PF}/link-ncurses-tinfo.patch"
"${FILESDIR}/${PF}/link-with-lld.patch" "${FILESDIR}/${PF}/link-with-lld.patch"
"${FILESDIR}/${PF}/respect-c-cxx-flags.patch" "${FILESDIR}/${PF}/respect-c-cxx-flags.patch"
"${FILESDIR}/${PF}/sanitizer-remove-scc.patch"
) )
S="${WORKDIR}" S="${WORKDIR}"