From 6b5a005cca2daef36e39c9959ba05c96c5515395 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Fri, 10 Jul 2026 19:15:55 +0300 Subject: [PATCH] Rebuild package --- info.yml | 2 +- recipe.sh | 2 + source-files/remove-linux-scc.h.patch | 60 +++++++++++++++++++++++++++ 3 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 source-files/remove-linux-scc.h.patch diff --git a/info.yml b/info.yml index 9a367f4..54263ae 100644 --- a/info.yml +++ b/info.yml @@ -1,7 +1,7 @@ name: llvm21 description: A collection of modular and reusable compiler and toolchain technologies version: 21.1.8 -revision: 2 +revision: 3 url: https://llvm.org license: Apache2-with-llvm-exception maintainers: diff --git a/recipe.sh b/recipe.sh index b172dd3..6c37968 100644 --- a/recipe.sh +++ b/recipe.sh @@ -7,6 +7,8 @@ prepare() { cd "$BPM_SOURCE"/tools patch -Np1 -i "$BPM_WORKDIR"/enable-fstack-protector-strong-by-default.patch + cd "$BPM_SOURCE"/projects/compiler-rt + patch -Np2 -i "$BPM_WORKDIR"/remove-linux-scc.h.patch } # The build function is executed in the source directory diff --git a/source-files/remove-linux-scc.h.patch b/source-files/remove-linux-scc.h.patch new file mode 100644 index 0000000..934c076 --- /dev/null +++ b/source-files/remove-linux-scc.h.patch @@ -0,0 +1,60 @@ +From 12239e6eb6f38ee85bed432ecdb92c41481f88c9 Mon Sep 17 00:00:00 2001 +From: cqwrteur +Date: Sat, 25 Apr 2026 14:23:32 +0800 +Subject: [PATCH] [compiler-rt][sanitizer] Remove linux/scc.h (#194116) + +#194110 + +Linux Kernel has removed scc.h header completely from the source code +Therefore, we need to remove the usage in compiler-rt/sanitizer too. +https://github.com/torvalds/linux/commit/64edfa65062dc4509ba75978116b2f6d392346f5#diff-1ca78e598a5041ee51ae795d168435afad598b82a7a0ce80f215993589b96c7c + +Without removing it, not only it breaks compiler-rt but also GCC build +since GCC always builds libsanitizer for linux targets. + +After merging this we will need to cherry pick to GCC. + +(cherry picked from commit 3dc4fd6dd41100f051a63642f449b16324389c96) +--- + .../sanitizer_platform_limits_posix.cpp | 21 ++++++++----------- + 1 file changed, 9 insertions(+), 12 deletions(-) + +diff --git a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +index ea8cc306268cb..0109df531e88c 100644 +--- a/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp ++++ b/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_posix.cpp +@@ -151,16 +151,15 @@ typedef struct user_fpregs elf_fpregset_t; + #if defined(__mips64) + # include + #endif +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include +-#include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include ++# include + #endif // SANITIZER_ANDROID + + #include +@@ -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);