From 45e08e4aa93e6f8cf069bd56af3798e8ab6e7bf3 Mon Sep 17 00:00:00 2001 From: EnumDev Date: Fri, 1 May 2026 13:53:40 +0300 Subject: [PATCH] Update package version to 22.1.4 --- pkg.info | 24 ++++-------------- ...e-fstack-protector-strong-by-default.patch | 25 ++++++++----------- source.sh | 12 ++++++--- 3 files changed, 25 insertions(+), 36 deletions(-) diff --git a/pkg.info b/pkg.info index f6341c5..6d6bd24 100644 --- a/pkg.info +++ b/pkg.info @@ -1,9 +1,11 @@ name: llvm description: A collection of modular and reusable compiler and toolchain technologies -version: 21.1.8 +version: 22.1.4 revision: 1 url: https://llvm.org license: Apache2-with-llvm-exception +maintainers: + - enumdev@enumerated.dev architecture: any type: source make_depends: @@ -15,26 +17,10 @@ make_depends: - zlib - zstd downloads: - - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/llvm-${BPM_PKG_VERSION}.src.tar.xz + - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/llvm-project-${BPM_PKG_VERSION}.src.tar.xz extract_to: ${BPM_SOURCE} extract_strip_components: 1 - checksum: d9022ddadb40a15015f6b27e6549a7144704ded8828ba036ffe4b8165707de21 - - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/clang-${BPM_PKG_VERSION}.src.tar.xz - extract_to: ${BPM_SOURCE}/tools/clang - extract_strip_components: 1 - checksum: 6090e3f23720d003cdd84483a47d0eec6d01adbb5e0c714ac0c8b58de546aa62 - - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/compiler-rt-${BPM_PKG_VERSION}.src.tar.xz - extract_to: ${BPM_SOURCE}/projects/compiler-rt - extract_strip_components: 1 - checksum: dd54ae21aee1780fac59445b51ebff601ad016b31ac3a7de3b21126fd3ccb229 - - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/cmake-${BPM_PKG_VERSION}.src.tar.xz - extract_to: cmake - extract_strip_components: 1 - checksum: 85735f20fd8c81ecb0a09abb0c267018475420e93b65050cc5b7634eab744de9 - - url: https://github.com/llvm/llvm-project/releases/download/llvmorg-${BPM_PKG_VERSION}/third-party-${BPM_PKG_VERSION}.src.tar.xz - extract_to: third-party - extract_strip_components: 1 - checksum: 7fe99424384aea529ffaeec9cc9dfb8b451fd1852c03fc109e426fe208a1f1a7 + checksum: 3e68c90dda630c27d41d201e37b8bbf5222e39b273dec5ca880709c69e0a07d4 split_packages: - name: llvm depends: diff --git a/source-files/enable-fstack-protector-strong-by-default.patch b/source-files/enable-fstack-protector-strong-by-default.patch index 7c7fc31..9f08b93 100644 --- a/source-files/enable-fstack-protector-strong-by-default.patch +++ b/source-files/enable-fstack-protector-strong-by-default.patch @@ -1,16 +1,14 @@ -From 669e0924afcedf27350469a944267cad4aabb866 Mon Sep 17 00:00:00 2001 +From b5a34a397a495fed4e6db431945f3c000ae91b03 Mon Sep 17 00:00:00 2001 From: Evangelos Foutras Date: Sun, 30 Jun 2024 08:51:20 +0000 Subject: [PATCH] Enable -fstack-protector-strong by default --- - clang/lib/Driver/ToolChains/Linux.h | 5 +++++ - clang/test/Driver/fsanitize.c | 6 +++--- - clang/test/Driver/stack-protector.c | 4 ++-- + clang/lib/Driver/ToolChains/Linux.h | 5 +++++ + clang/test/Driver/fsanitize-safe-stack.c | 6 +++--- + clang/test/Driver/stack-protector.c | 4 ++-- 3 files changed, 10 insertions(+), 5 deletions(-) -diff --git a/clang/lib/Driver/ToolChains/Linux.h b/clang/lib/Driver/ToolChains/Linux.h -index 524391743090..0d4e1944118b 100644 --- a/clang/lib/Driver/ToolChains/Linux.h +++ b/clang/lib/Driver/ToolChains/Linux.h @@ -10,6 +10,7 @@ @@ -21,7 +19,7 @@ index 524391743090..0d4e1944118b 100644 #include "clang/Driver/ToolChain.h" namespace clang { -@@ -48,6 +49,10 @@ public: +@@ -50,6 +51,10 @@ IsAArch64OutlineAtomicsDefault(const llvm::opt::ArgList &Args) const override; bool isPIEDefault(const llvm::opt::ArgList &Args) const override; bool IsMathErrnoDefault() const override; @@ -32,11 +30,9 @@ index 524391743090..0d4e1944118b 100644 SanitizerMask getSupportedSanitizers() const override; void addProfileRTLibs(const llvm::opt::ArgList &Args, llvm::opt::ArgStringList &CmdArgs) const override; -diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c -index 1671825042c3..5d8ac7009f8c 100644 ---- a/clang/test/Driver/fsanitize.c -+++ b/clang/test/Driver/fsanitize.c -@@ -700,12 +700,12 @@ +--- a/clang/test/Driver/fsanitize-safe-stack.c ++++ b/clang/test/Driver/fsanitize-safe-stack.c +@@ -1,12 +1,12 @@ // RUN: %clang -fno-sanitize=safe-stack -### %s 2>&1 | FileCheck %s -check-prefix=NOSP // NOSP-NOT: "-fsanitize=safe-stack" @@ -52,8 +48,6 @@ index 1671825042c3..5d8ac7009f8c 100644 // NO-SP-NOT: stack-protector // NO-SP: "-fsanitize=safe-stack" // SP-ASAN: error: invalid argument '-fsanitize=safe-stack' not allowed with '-fsanitize=address' -diff --git a/clang/test/Driver/stack-protector.c b/clang/test/Driver/stack-protector.c -index 169376919a71..2470b7f7e39e 100644 --- a/clang/test/Driver/stack-protector.c +++ b/clang/test/Driver/stack-protector.c @@ -3,11 +3,11 @@ @@ -70,3 +64,6 @@ index 169376919a71..2470b7f7e39e 100644 // SSP-BUF: "-stack-protector-buffer-size" "16" // RUN: %clang -target i386-pc-openbsd -### %s 2>&1 | FileCheck %s -check-prefix=OPENBSD +-- +2.51.0 + diff --git a/source.sh b/source.sh index 88c1eca..d66a870 100644 --- a/source.sh +++ b/source.sh @@ -5,18 +5,22 @@ # The prepare function is executed in the root of the temp directory # This function is used for putting downloaded files to the correct location or applying patches prepare() { - cd "$BPM_SOURCE"/tools + cd "$BPM_SOURCE" patch -Np1 -i "$BPM_WORKDIR"/enable-fstack-protector-strong-by-default.patch } # The build function is executed in the source directory # This function is used to compile the source code build() { + cd "$BPM_SOURCE"/llvm + export CC=gcc CXX=g++ cmake -B build -DCMAKE_INSTALL_PREFIX=/usr \ -DCMAKE_BUILD_TYPE=Release \ -DCMAKE_SKIP_INSTALL_RPATH=ON \ -DLLVM_ENABLE_FFI=ON \ + -DLLVM_ENABLE_PROJECTS=clang \ + -DLLVM_ENABLE_RUNTIMES=compiler-rt \ -DLLVM_BUILD_LLVM_DYLIB=ON \ -DLLVM_LINK_LLVM_DYLIB=ON \ -DLLVM_ENABLE_RTTI=ON \ @@ -42,10 +46,12 @@ _pick() { # The package function is executed in the source directory # This function is used to move the compiled files into the output directory package_llvm() { + cd llvm + DESTDIR="$BPM_OUTPUT" cmake --install build # Install missing binary - install -Dm755 "$BPM_SOURCE"/build/bin/FileCheck "$BPM_OUTPUT"/usr/bin/FileCheck + install -Dm755 "$BPM_SOURCE"/llvm/build/bin/FileCheck "$BPM_OUTPUT"/usr/bin/FileCheck cd "$BPM_OUTPUT" @@ -97,7 +103,7 @@ package_clang() { local site_packages=$(python -c "import site; print(site.getsitepackages()[0])") install -d "$BPM_OUTPUT"/"$site_packages" mv "$BPM_OUTPUT"/usr/lib/{libear,libscanbuild} -t "$BPM_OUTPUT"/"$site_packages" - cp -a "$BPM_SOURCE"/tools/clang/bindings/python/clang "$BPM_OUTPUT"/"$site_packages" + cp -a "$BPM_SOURCE"/clang/bindings/python/clang "$BPM_OUTPUT"/"$site_packages" # Install package license install -Dm644 "$BPM_SOURCE"/LICENSE.TXT "$BPM_OUTPUT"/usr/share/licenses/clang/LICENSE.TXT