summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2024-08-07 09:33:23 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2024-10-17 00:58:46 -0500
commitd9f3b70cb7fef7c93080b710388a264555a986ae (patch)
tree99a03b4638e4aac984bf5d762ce0358b3c787461
parent7298104a8699ad58226e9995ef7a8417932b2110 (diff)
downloadpackages-d9f3b70cb7fef7c93080b710388a264555a986ae.tar.gz
packages-d9f3b70cb7fef7c93080b710388a264555a986ae.tar.bz2
packages-d9f3b70cb7fef7c93080b710388a264555a986ae.tar.xz
packages-d9f3b70cb7fef7c93080b710388a264555a986ae.zip
user/clang: Update to 18.1.8
-rw-r--r--user/clang/0001-Add-support-for-Ad-lie-Linux.patch18
-rw-r--r--user/clang/APKBUILD33
-rw-r--r--user/clang/cfe-005-ppc64-dynamic-linker-path.patch2
-rw-r--r--user/clang/ppc-interp.patch17
-rw-r--r--user/clang/ppc64-elfv2.patch11
-rw-r--r--user/clang/use-llvm-lit.patch2
6 files changed, 31 insertions, 52 deletions
diff --git a/user/clang/0001-Add-support-for-Ad-lie-Linux.patch b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch
index a6fbcdd3f..9f2612440 100644
--- a/user/clang/0001-Add-support-for-Ad-lie-Linux.patch
+++ b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch
@@ -24,7 +24,7 @@ index 7b34a09256..7a3774a4f1 100644
AlpineLinux,
ArchLinux,
DebianLenny,
-@@ -130,3 +130,5 @@ public:
+@@ -134,3 +135,5 @@ public:
}
+ bool IsAdelieLinux() const { return DistroVal == AdelieLinux; }
@@ -36,7 +36,7 @@ index 2c4d44faf8..7ef35ab379 100644
+++ b/lib/Driver/Distro.cpp
@@ -36,6 +36,7 @@
for (StringRef Line : Lines)
- if (Version == Distro::UnknownDistro && Line.startswith("ID="))
+ if (Version == Distro::UnknownDistro && Line.starts_with("ID="))
Version = llvm::StringSwitch<Distro::DistroType>(Line.substr(3))
+ .Case("adelie", Distro::AdelieLinux)
.Case("alpine", Distro::AlpineLinux)
@@ -44,9 +44,9 @@ index 2c4d44faf8..7ef35ab379 100644
.Case("gentoo", Distro::Gentoo)
--- cfe-8.0.0.src/lib/Driver/ToolChains/Linux.cpp.old 2018-11-29 18:52:22.000000000 +0000
+++ cfe-8.0.0.src/lib/Driver/ToolChains/Linux.cpp 2019-04-23 23:49:37.786181838 +0000
-@@ -188,13 +188,13 @@
+@@ -226,13 +226,13 @@
- Distro Distro(D.getVFS());
+ Distro Distro(D.getVFS(), Triple);
- if (Distro.IsAlpineLinux() || Triple.isAndroid()) {
+ if (Distro.IsAdelieLinux() || Distro.IsAlpineLinux() || Triple.isAndroid()) {
@@ -60,13 +60,3 @@ index 2c4d44faf8..7ef35ab379 100644
ExtraOpts.push_back("-z");
ExtraOpts.push_back("relro");
}
-@@ -234,7 +234,8 @@
- if (!IsMips && !IsHexagon) {
- if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
- (Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
-- (IsAndroid && !Triple.isAndroidVersionLT(23)))
-+ (IsAndroid && !Triple.isAndroidVersionLT(23)) ||
-+ Distro.IsAdelieLinux())
- ExtraOpts.push_back("--hash-style=gnu");
-
- if (Distro.IsDebian() || Distro.IsOpenSUSE() ||
diff --git a/user/clang/APKBUILD b/user/clang/APKBUILD
index d829f0032..bdc1cdad7 100644
--- a/user/clang/APKBUILD
+++ b/user/clang/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=clang
# Note: Update together with llvm.
-pkgver=14.0.6
+pkgver=18.1.8
pkgrel=0
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
@@ -16,16 +16,14 @@ makedepends="cmake isl-dev libedit-dev libexecinfo-dev libxml2-dev libxml2-utils
z3 z3-dev"
subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
$pkgname-analyzer::noarch"
-source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/$pkgname-$pkgver.src.tar.xz
- https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-$pkgver.src.tar.xz
+source="https://github.com/llvm/llvm-project/releases/download/llvmorg-$pkgver/llvm-project-$pkgver.src.tar.xz
0001-Add-support-for-Ad-lie-Linux.patch
cfe-005-ppc64-dynamic-linker-path.patch
ppc-dirwatcher.patch
ppc-interp.patch
- ppc64-elfv2.patch
use-llvm-lit.patch
"
-builddir="$srcdir/$pkgname-$pkgver.src"
+builddir="$srcdir/llvm-project-$pkgver.src/$pkgname"
prepare() {
default_prepare
@@ -63,12 +61,20 @@ prepare() {
test/utils/update_cc_test_checks/replace-value-regex-across-runs.test \
test/utils/update_cc_test_checks/resolve-tmp-conflict.test \
;
+
+ rm -f test/Driver/ppc-float-abi-warning.cpp
}
build() {
+ _build_type=MinSizeRel
+ case $CARCH in
+ ppc64)
+ # https://github.com/llvm/llvm-project/issues/102192
+ _build_type=Release;;
+ esac
CMAKE_PREFIX_PATH=/usr/lib/llvm$_llvmver/lib/cmake \
cmake -Wno-dev \
- -DCMAKE_BUILD_TYPE=MinSizeRel \
+ -DCMAKE_BUILD_TYPE=$_build_type \
-DCMAKE_INSTALL_PREFIX=/usr \
-DCMAKE_VERBOSE_MAKEFILE=OFF \
-DCLANG_VENDOR=${DISTRO_SHORT_NAME:-Adélie} \
@@ -80,7 +86,7 @@ build() {
-DLLVM_ENABLE_EH=ON \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src" \
- -DLLVM_EXTERNAL_LIT="$builddir/build/bin/llvm-lit" \
+ -DLLVM_EXTERNAL_LIT="/usr/lib/llvm$_llvmver/bin/lit" \
-Bbuild \
.
@@ -94,7 +100,6 @@ build() {
}
check() {
- [ -f build/bin/llvm-lit ] || ln -s /usr/bin/lit build/bin/llvm-lit
make -C build check-clang
}
@@ -143,11 +148,9 @@ analyzer() {
mv usr/share/scan-* "$subpkgdir"/usr/share/
}
-sha512sums="5f5497b57dd116225e90f321902f1015beb50c0b1bb90d0fc6c026f13aa748feabe44f98eb75e86f98f3b1785ad5e850210732f3eae75b942ecd520527dcd30b clang-14.0.6.src.tar.xz
-6461bdde27aac17fa44c3e99a85ec47ffb181d0d4e5c3ef1c4286a59583e3b0c51af3c8081a300f45b99524340773a3011380059e3b3a571c3b0a8733e96fc1d llvm-14.0.6.src.tar.xz
-7f422f671167498102789e8c0b3ab4e46d6a4433d89f0f6b2cf0736ad257146e5eeb04b6f1d9431cce4635c9691d0cc80e643f852269bf7119ce312ae9bb8068 0001-Add-support-for-Ad-lie-Linux.patch
-b3c999ef1e380b02a25f1ebca4811f1c696b88309b73af0c19865e3b92084becc9529b910d24b4fb7133606c1e105860104017406d876f95e9260c716348bd1c cfe-005-ppc64-dynamic-linker-path.patch
+sha512sums="25eeee9984c8b4d0fbc240df90f33cbb000d3b0414baff5c8982beafcc5e59e7ef18f6f85d95b3a5f60cb3d4cd4f877c80487b5768bc21bc833f107698ad93db llvm-project-18.1.8.src.tar.xz
+d37d2339a76c21666aa4405b2a620100e6967eb933535b5cea05f5de25a4d75510479443500715529cea38014028741d71553c7b247d5f349a05660133d66bc6 0001-Add-support-for-Ad-lie-Linux.patch
+8272ec0eeb93287c9cc961099139f7cb0f94561befc31a4521387fa5f7216dc4b3d99750c4560a0b71ec4acde5bd776abef733cfafe81058ef054b62f72fc209 cfe-005-ppc64-dynamic-linker-path.patch
0032fdd3864870d345caff9c4ff44f58bebc802bddf06c4b3bf30276c89e237167e6dea03456d322d3f6e2ee5e3a2ecf9f649ed033f0ab078b80bda44371b3ce ppc-dirwatcher.patch
-0d8f77100cd8550be0dc251704081574b0cdc46169df1428ad8cc9f689cdaa47adcd9ff45a816e238ee279395036c7548bf1033307aabbb3a62cce9f360698eb ppc-interp.patch
-4f534e72cf3ec9134d9f77a1a787c84859a5ee84b52da529d47745eb7d75d383070573018588bfbf622e826fcb281fdf20fa79217024df5cb824e6ae1ea1d7bf ppc64-elfv2.patch
-1f93918d512849e8bf7eb4e71d2b623c0ae3361e4b6ed5b50b76b0fe78e3d70f8773061b1ea0f327950a4f7c2ffdcdaafcb224301732df2a7469c742e8f5883f use-llvm-lit.patch"
+d6de2ed213e2c2a95e6ee68c7c6abe72cad0b97341b221f1c3eed13fc3fbeb95b0a4b07bff9504461d64a659b7f4ea6d61be4ec9ff5c63722b0f41ab135e29a0 ppc-interp.patch
+6c6b4fc49539ecf02e4eec9c2bbd89cc37fe01383e7884aa52c90ab0a4aa23cd9a86716bc645af6949f787d2fe3b9a3ad177baef1edbec928437872d14db536d use-llvm-lit.patch"
diff --git a/user/clang/cfe-005-ppc64-dynamic-linker-path.patch b/user/clang/cfe-005-ppc64-dynamic-linker-path.patch
index eadc65bfa..0238ca5c6 100644
--- a/user/clang/cfe-005-ppc64-dynamic-linker-path.patch
+++ b/user/clang/cfe-005-ppc64-dynamic-linker-path.patch
@@ -1,6 +1,6 @@
--- a/lib/Driver/ToolChains/Linux.cpp
+++ b/lib/Driver/ToolChains/Linux.cpp
-@@ -485,12 +485,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+@@ -551,12 +551,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
Loader = "ld.so.1";
break;
case llvm::Triple::ppc64:
diff --git a/user/clang/ppc-interp.patch b/user/clang/ppc-interp.patch
index a8cb6bc90..bc2905f42 100644
--- a/user/clang/ppc-interp.patch
+++ b/user/clang/ppc-interp.patch
@@ -3,23 +3,20 @@ implemented in RuntimeDyld.
--- clang-14.0.6.src/test/Interpreter/execute.cpp.old 2022-06-22 16:46:24.000000000 +0000
+++ clang-14.0.6.src/test/Interpreter/execute.cpp 2022-12-05 01:04:26.517960246 +0000
-@@ -1,7 +1,7 @@
- // RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
- // RUN: 'auto r1 = printf("i = %d\n", i);' | FileCheck --check-prefix=CHECK-DRIVER %s
- // REQUIRES: host-supports-jit
+@@ -1,4 +1,4 @@
-// UNSUPPORTED: system-aix
+// UNSUPPORTED: system-aix, powerpc-
- // CHECK-DRIVER: i = 10
- // RUN: cat %s | clang-repl | FileCheck %s
- extern "C" int printf(const char *, ...);
+
+ // clang-format off
+ // RUN: clang-repl "int i = 10;" 'extern "C" int printf(const char*,...);' \
--- clang-14.0.6.src/unittests/Interpreter/InterpreterTest.cpp.old 2022-06-22 16:46:24.000000000 +0000
+++ clang-14.0.6.src/unittests/Interpreter/InterpreterTest.cpp 2022-12-05 01:53:47.058187317 +0000
-@@ -205,7 +205,7 @@
+@@ -270,7 +270,7 @@
return R.getFoundDecl();
}
--#ifdef _AIX
-+#if defined(_AIX) || (!defined(__powerpc64__) && defined(__powerpc__))
+-#ifdef CLANG_INTERPRETER_NO_SUPPORT_EXEC
++#if defined(CLANG_INTERPRETER_NO_SUPPORT_EXEC) || (!defined(__powerpc64__) && defined(__powerpc__))
TEST(IncrementalProcessing, DISABLED_InstantiateTemplate) {
#else
TEST(IncrementalProcessing, InstantiateTemplate) {
diff --git a/user/clang/ppc64-elfv2.patch b/user/clang/ppc64-elfv2.patch
deleted file mode 100644
index 7c5ef421c..000000000
--- a/user/clang/ppc64-elfv2.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cfe-8.0.0.src/lib/Basic/Targets/PPC.h.old 2019-02-12 11:19:21.000000000 +0000
-+++ cfe-8.0.0.src/lib/Basic/Targets/PPC.h 2019-06-01 23:18:07.613180102 +0000
-@@ -427,7 +427,7 @@
- ABI = "elfv2";
- } else {
- DataLayout = "E-m:e-i64:64-n32:64";
-- ABI = "elfv1";
-+ ABI = (Triple.getEnvironment() == llvm::Triple::Musl) ? "elfv2" : "elfv1";
- }
-
- if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
diff --git a/user/clang/use-llvm-lit.patch b/user/clang/use-llvm-lit.patch
index 4ce2bedde..5652ff12f 100644
--- a/user/clang/use-llvm-lit.patch
+++ b/user/clang/use-llvm-lit.patch
@@ -1,6 +1,6 @@
--- cfe-6.0.1.src/test/CMakeLists.txt.old 2017-12-12 19:47:40.000000000 +0000
+++ cfe-6.0.1.src/test/CMakeLists.txt 2018-09-13 17:01:03.690000000 +0000
-@@ -164,7 +164,7 @@
+@@ -170,7 +170,7 @@
add_lit_testsuite(check-clang "Running the Clang regression tests"
${CMAKE_CURRENT_BINARY_DIR}