summaryrefslogtreecommitdiff
path: root/user/clang
diff options
context:
space:
mode:
Diffstat (limited to 'user/clang')
-rw-r--r--user/clang/0001-Add-support-for-Ad-lie-Linux.patch38
-rw-r--r--user/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch25
-rw-r--r--user/clang/APKBUILD28
-rw-r--r--user/clang/cfe-005-ppc64-dynamic-linker-path.patch2
-rw-r--r--user/clang/pmmx-musl.patch12
-rw-r--r--user/clang/ppc64-elfv2.patch33
-rw-r--r--user/clang/secure-plt.patch11
-rw-r--r--user/clang/use-llvm-lit.patch2
8 files changed, 32 insertions, 119 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 4c2ef219f..a6fbcdd3f 100644
--- a/user/clang/0001-Add-support-for-Ad-lie-Linux.patch
+++ b/user/clang/0001-Add-support-for-Ad-lie-Linux.patch
@@ -16,7 +16,7 @@ diff --git a/include/clang/Driver/Distro.h b/include/clang/Driver/Distro.h
index 7b34a09256..7a3774a4f1 100644
--- a/include/clang/Driver/Distro.h
+++ b/include/clang/Driver/Distro.h
-@@ -26,6 +26,7 @@ public:
+@@ -28,6 +28,7 @@ public:
// NB: Releases of a particular Linux distro should be kept together
// in this enum, because some tests are done by integer comparison against
// the first and last known member in the family, e.g. IsRedHat().
@@ -24,37 +24,27 @@ index 7b34a09256..7a3774a4f1 100644
AlpineLinux,
ArchLinux,
DebianLenny,
-@@ -120,6 +121,10 @@ public:
- return DistroVal >= UbuntuHardy && DistroVal <= UbuntuDisco;
+@@ -130,3 +130,5 @@ public:
}
-+ bool IsAdelieLinux() const {
-+ return DistroVal == AdelieLinux;
-+ }
++ bool IsAdelieLinux() const { return DistroVal == AdelieLinux; }
+
- bool IsAlpineLinux() const {
- return DistroVal == AlpineLinux;
- }
+ bool IsAlpineLinux() const { return DistroVal == AlpineLinux; }
diff --git a/lib/Driver/Distro.cpp b/lib/Driver/Distro.cpp
index 2c4d44faf8..7ef35ab379 100644
--- a/lib/Driver/Distro.cpp
+++ b/lib/Driver/Distro.cpp
-@@ -132,6 +132,9 @@ static Distro::DistroType DetectDistro(vfs::FileSystem &VFS) {
- if (VFS.exists("/etc/exherbo-release"))
- return Distro::Exherbo;
-
-+ if (VFS.exists("/etc/adelie-release"))
-+ return Distro::AdelieLinux;
-+
- if (VFS.exists("/etc/alpine-release"))
- return Distro::AlpineLinux;
-
---
-2.18.0
-
+@@ -36,6 +36,7 @@
+ for (StringRef Line : Lines)
+ if (Version == Distro::UnknownDistro && Line.startswith("ID="))
+ Version = llvm::StringSwitch<Distro::DistroType>(Line.substr(3))
++ .Case("adelie", Distro::AdelieLinux)
+ .Case("alpine", Distro::AlpineLinux)
+ .Case("fedora", Distro::Fedora)
+ .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
-@@ -241,13 +241,13 @@
+@@ -188,13 +188,13 @@
Distro Distro(D.getVFS());
@@ -70,7 +60,7 @@ index 2c4d44faf8..7ef35ab379 100644
ExtraOpts.push_back("-z");
ExtraOpts.push_back("relro");
}
-@@ -290,7 +290,8 @@
+@@ -234,7 +234,8 @@
if (!IsMips && !IsHexagon) {
if (Distro.IsRedhat() || Distro.IsOpenSUSE() || Distro.IsAlpineLinux() ||
(Distro.IsUbuntu() && Distro >= Distro::UbuntuMaverick) ||
diff --git a/user/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch b/user/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch
deleted file mode 100644
index f1c1c2449..000000000
--- a/user/clang/0008-Fix-ClangConfig-cmake-LLVM-path.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Adeel <adeelbm@outlook.com>
-Date: Sun, 6 May 2018 10:22:00 +0200
-Subject: [PATCH] Fix ClangConfig.cmake to look for LLVM-Config.cmake in correct location
-
-This results in the following change in the generated ClangConfig.cmake:
-
- find_package(LLVM REQUIRED CONFIG
- - HINTS "${CLANG_INSTALL_PREFIX}/lib/cmake/llvm")
- + HINTS "/usr/lib/llvm5/lib/cmake/llvm")
-
-This is needed e.g. for building lldb.
-
-See https://github.com/alpinelinux/aports/pull/2342 for more information.
-
---- a/cmake/modules/CMakeLists.txt
-+++ b/cmake/modules/CMakeLists.txt
-@@ -39,7 +39,7 @@ foreach(p ${_count})
- get_filename_component(CLANG_INSTALL_PREFIX \"\${CLANG_INSTALL_PREFIX}\" PATH)")
- endforeach(p)
- set(CLANG_CONFIG_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${CLANG_INSTALL_PACKAGE_DIR}")
--set(CLANG_CONFIG_LLVM_CMAKE_DIR "\${CLANG_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
-+set(CLANG_CONFIG_LLVM_CMAKE_DIR "${llvm_cmake_builddir}")
- set(CLANG_CONFIG_EXPORTS_FILE "\${CLANG_CMAKE_DIR}/ClangTargets.cmake")
- set(CLANG_CONFIG_INCLUDE_DIRS
- "\${CLANG_INSTALL_PREFIX}/include"
diff --git a/user/clang/APKBUILD b/user/clang/APKBUILD
index 1c28c2c9d..51c167189 100644
--- a/user/clang/APKBUILD
+++ b/user/clang/APKBUILD
@@ -2,8 +2,8 @@
# Maintainer: A. Wilcox <awilfox@adelielinux.org>
pkgname=clang
# Note: Update together with llvm.
-pkgver=8.0.1
-pkgrel=1
+pkgver=14.0.6
+pkgrel=0
_llvmver=${pkgver%%.*}
pkgdesc="A C language family front-end for LLVM"
arch="all"
@@ -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/cfe-$pkgver.src.tar.xz
+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
0001-Add-support-for-Ad-lie-Linux.patch
- 0008-Fix-ClangConfig-cmake-LLVM-path.patch
cfe-005-ppc64-dynamic-linker-path.patch
- pmmx-musl.patch
ppc64-elfv2.patch
- secure-plt.patch
use-llvm-lit.patch
"
-builddir="$srcdir/cfe-$pkgver.src"
+builddir="$srcdir/$pkgname-$pkgver.src"
build() {
CMAKE_PREFIX_PATH=/usr/lib/llvm$_llvmver/lib/cmake \
@@ -41,6 +39,8 @@ build() {
-DLIBCLANG_BUILD_STATIC=ON \
-DLLVM_ENABLE_EH=ON \
-DLLVM_ENABLE_RTTI=ON \
+ -DLLVM_MAIN_SRC_DIR="$srcdir/llvm-$pkgver.src" \
+ -DLLVM_EXTERNAL_LIT="$builddir/build/bin/llvm-lit" \
-Bbuild \
.
@@ -105,11 +105,9 @@ analyzer() {
mv usr/share/scan-* "$subpkgdir"/usr/share/
}
-sha512sums="1227b2d32052c70b4b494659849000188fce46fc31a71f3352ba8457ac0b0b17e4bc7c8589874c8586d55aa808ee6c1fceb7df501aafa33599f8df7bfd2b791d cfe-8.0.1.src.tar.xz
-15f8c4e3453c0620ccd47e5dae37de29f722bc5f16aa64a3ff1ac2a2d522dd3e13dada539f1944c51f334d0f91ac60d0189578c252c49ba39d17cdf42021086b 0001-Add-support-for-Ad-lie-Linux.patch
-9485fe4fd6182df543735ed8f4ce618693d0faeafa86d3f9574a6c7abf50978e2d56e0a94be3ed94d515cc937c388d66ceff1bbc9bb120d371b6d3e95340da00 0008-Fix-ClangConfig-cmake-LLVM-path.patch
-ee5606b130354983202a1d7c96183ea81dec1048a92dc059bbc07fd4e8e21c1279064422d8f432d2b6e5d88d883f1e2c8f8dada716d82ae4068c9fea3e1b0a54 cfe-005-ppc64-dynamic-linker-path.patch
-13b6b03798c724f1444d8639cfab0c971560618ff7a61f461bde5ab004bdbadbf9960ab30bbb19fcc9e305712b66a22bf88998f2cdd6f5e3ba7065539abc40a0 pmmx-musl.patch
-de0b806ad632c76789f7cf750e6b23cc72b3708a9566ef25d5ac3f51840972163a57304802259a0408fb33f44334ec12cef49600f766e8329af489c9a991af74 ppc64-elfv2.patch
-08a231b73561c78195a717aed022c60264b3d77ad01df07835fec397994b09cf703fe16ad7a8f62acdc37269e0a6ef8bd07c3289db58490440c766f58c3af239 secure-plt.patch
-1b0e7fe72de58a5a22d4c4afe7c3bcab23244e6e5e01df43752a38b4cafcfb47ba1877641db285cd31869d5521657b6c6280506d872c25191b10a8661b43b0fe use-llvm-lit.patch"
+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
+4f534e72cf3ec9134d9f77a1a787c84859a5ee84b52da529d47745eb7d75d383070573018588bfbf622e826fcb281fdf20fa79217024df5cb824e6ae1ea1d7bf ppc64-elfv2.patch
+1f93918d512849e8bf7eb4e71d2b623c0ae3361e4b6ed5b50b76b0fe78e3d70f8773061b1ea0f327950a4f7c2ffdcdaafcb224301732df2a7469c742e8f5883f 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 b4c41b1c3..eadc65bfa 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
-@@ -596,12 +596,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+@@ -485,12 +485,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
Loader = "ld.so.1";
break;
case llvm::Triple::ppc64:
diff --git a/user/clang/pmmx-musl.patch b/user/clang/pmmx-musl.patch
deleted file mode 100644
index 2a3803349..000000000
--- a/user/clang/pmmx-musl.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- 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-06-01 23:22:27.015221397 +0000
-@@ -534,6 +534,9 @@
- ArchName = "armeb";
- IsArm = true;
- break;
-+ case llvm::Triple::x86:
-+ ArchName = "i386";
-+ break;
- default:
- ArchName = Triple.getArchName().str();
- }
diff --git a/user/clang/ppc64-elfv2.patch b/user/clang/ppc64-elfv2.patch
index 236bd9ae8..7c5ef421c 100644
--- a/user/clang/ppc64-elfv2.patch
+++ b/user/clang/ppc64-elfv2.patch
@@ -1,38 +1,11 @@
--- 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
-@@ -367,7 +367,7 @@
+@@ -427,7 +427,7 @@
ABI = "elfv2";
} else {
- resetDataLayout("E-m:e-i64:64-n32:64");
+ DataLayout = "E-m:e-i64:64-n32:64";
- ABI = "elfv1";
+ ABI = (Triple.getEnvironment() == llvm::Triple::Musl) ? "elfv2" : "elfv1";
}
- switch (getTriple().getOS()) {
-@@ -375,6 +375,15 @@
- LongDoubleWidth = LongDoubleAlign = 64;
- LongDoubleFormat = &llvm::APFloat::IEEEdouble();
- break;
-+ default:
-+ break;
-+ }
-+
-+ switch (getTriple().getEnvironment()) {
-+ case llvm::Triple::Musl:
-+ LongDoubleWidth = LongDoubleAlign = 64;
-+ LongDoubleFormat = &llvm::APFloat::IEEEdouble();
-+ break;
- default:
- break;
- }
---- cfe-8.0.0.src/lib/Driver/ToolChains/Clang.cpp.old 2019-01-25 00:15:41.000000000 +0000
-+++ cfe-8.0.0.src/lib/Driver/ToolChains/Clang.cpp 2019-06-01 23:19:33.973868618 +0000
-@@ -1751,7 +1751,7 @@
- break;
- }
-
-- ABIName = "elfv1";
-+ ABIName = (getToolChain().getTriple().isMusl()) ? "elfv2" : "elfv1";
- break;
- }
- case llvm::Triple::ppc64le:
+ if (Triple.isOSFreeBSD() || Triple.isOSOpenBSD() || Triple.isMusl()) {
diff --git a/user/clang/secure-plt.patch b/user/clang/secure-plt.patch
deleted file mode 100644
index 670e845c2..000000000
--- a/user/clang/secure-plt.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- cfe-7.0.1.src/lib/Driver/ToolChains/Arch/PPC.cpp.old 2018-11-29 00:31:15.000000000 +0000
-+++ cfe-7.0.1.src/lib/Driver/ToolChains/Arch/PPC.cpp 2019-03-10 04:37:49.350000000 +0000
-@@ -116,7 +116,7 @@
- const ArgList &Args) {
- if (Args.getLastArg(options::OPT_msecure_plt))
- return ppc::ReadGOTPtrMode::SecurePlt;
-- if (Triple.isOSNetBSD() || Triple.isOSOpenBSD())
-+ if (Triple.isOSNetBSD() || Triple.isOSOpenBSD() || Triple.isMusl())
- return ppc::ReadGOTPtrMode::SecurePlt;
- else
- return ppc::ReadGOTPtrMode::Bss;
diff --git a/user/clang/use-llvm-lit.patch b/user/clang/use-llvm-lit.patch
index f5e10d9d6..4ce2bedde 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
-@@ -126,7 +126,7 @@
+@@ -164,7 +164,7 @@
add_lit_testsuite(check-clang "Running the Clang regression tests"
${CMAKE_CURRENT_BINARY_DIR}