summaryrefslogtreecommitdiff
path: root/user
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-02 00:04:22 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-06-02 00:04:22 +0000
commit926ad4bd48fef3738c760fe9444ceda25b11d67f (patch)
treedb62b8fb274d2ef9d2373a9af1625f65fc42b9d3 /user
parentfc8a8c07a6a2d4497783d92264a2cf2036161867 (diff)
downloadpackages-926ad4bd48fef3738c760fe9444ceda25b11d67f.tar.gz
packages-926ad4bd48fef3738c760fe9444ceda25b11d67f.tar.bz2
packages-926ad4bd48fef3738c760fe9444ceda25b11d67f.tar.xz
packages-926ad4bd48fef3738c760fe9444ceda25b11d67f.zip
user/clang: fix ppc64 ABI and ldbl size; fix pmmx DT_INTERP
Diffstat (limited to 'user')
-rw-r--r--user/clang/APKBUILD12
-rw-r--r--user/clang/cfe-005-ppc64-dynamic-linker-path.patch17
-rw-r--r--user/clang/pmmx-musl.patch12
-rw-r--r--user/clang/ppc64-elfv2.patch38
4 files changed, 76 insertions, 3 deletions
diff --git a/user/clang/APKBUILD b/user/clang/APKBUILD
index 78db7102c..e5ed50d06 100644
--- a/user/clang/APKBUILD
+++ b/user/clang/APKBUILD
@@ -19,8 +19,11 @@ subpackages="$pkgname-static $pkgname-dev $pkgname-doc $pkgname-libs
source="https://llvm.org/releases/$pkgver/cfe-$pkgver.src.tar.xz
0001-Add-support-for-Ad-lie-Linux.patch
0008-Fix-ClangConfig-cmake-LLVM-path.patch
- use-llvm-lit.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"
@@ -108,5 +111,8 @@ analyzer() {
sha512sums="98e540222719716985e5d8439116e47469cb01201ea91d1da7e46cb6633da099688d9352c3b65e5c5f660cbbae353b3d79bb803fc66b3be663f2b04b1feed1c3 cfe-8.0.0.src.tar.xz
c3218a1622f53bb6bef65f844e32e1b048a1ed7d5aa444a7592f9b8e8543d41438a0ac032674adb2c1bf0ef8c6fbd6880c34f8c8e778a8fd31bb542968a3547e 0001-Add-support-for-Ad-lie-Linux.patch
9485fe4fd6182df543735ed8f4ce618693d0faeafa86d3f9574a6c7abf50978e2d56e0a94be3ed94d515cc937c388d66ceff1bbc9bb120d371b6d3e95340da00 0008-Fix-ClangConfig-cmake-LLVM-path.patch
-8a596e7369b5791e7e9c3278320aa5bac30d91f27d9a0df335ea862c359623869353d12145c3b64730f721600522f3acc5abe706428091482e0209e4ff308175 use-llvm-lit.patch
-9dad6dfb0097f79939b743dbe7ed20274c463d9c41f061a957841c60070247a4760b676465652e2e844fc75aab9a5b7f9f4dd7632f2ff5dd5b0a335fcbd29312 secure-plt.patch"
+e24b0eb5f0f2b58f8d18d7d191dccc76510a179738db1f42624bd68c6de92ea57d323e28f9ee1e4df59e44a2c00a23527ba21c1c1fce9ac5858db9b3049914f2 cfe-005-ppc64-dynamic-linker-path.patch
+1a76a74c193ea59b0114b116c5a9a7807b40a449e9c601263379fd7252867adb8ea8d4720f9fc8d801748176976d968990be29323bff9d5f3a03c4cfe80c61c4 pmmx-musl.patch
+26b6cb952a77e15f113c88f2417e510ddd496f5c3c3de2e51c1a7cf14a78d0b25cd881f40c5c7e95dde3b2b63bbd3d485544097eed8673669a755b456a1dcd71 ppc64-elfv2.patch
+9dad6dfb0097f79939b743dbe7ed20274c463d9c41f061a957841c60070247a4760b676465652e2e844fc75aab9a5b7f9f4dd7632f2ff5dd5b0a335fcbd29312 secure-plt.patch
+8a596e7369b5791e7e9c3278320aa5bac30d91f27d9a0df335ea862c359623869353d12145c3b64730f721600522f3acc5abe706428091482e0209e4ff308175 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
new file mode 100644
index 000000000..d559d949b
--- /dev/null
+++ b/user/clang/cfe-005-ppc64-dynamic-linker-path.patch
@@ -0,0 +1,17 @@
+--- a/lib/Driver/ToolChains/Linux.cpp
++++ b/lib/Driver/ToolChains/Linux.cpp
+@@ -590,12 +590,12 @@ std::string Linux::getDynamicLinker(const ArgList &Args) const {
+ Loader = "ld.so.1";
+ break;
+ case llvm::Triple::ppc64:
+- LibDir = "lib64";
++ LibDir = "lib";
+ Loader =
+ (tools::ppc::hasPPCAbiArg(Args, "elfv2")) ? "ld64.so.2" : "ld64.so.1";
+ break;
+ case llvm::Triple::ppc64le:
+- LibDir = "lib64";
++ LibDir = "lib";
+ Loader =
+ (tools::ppc::hasPPCAbiArg(Args, "elfv1")) ? "ld64.so.1" : "ld64.so.2";
+ break;
diff --git a/user/clang/pmmx-musl.patch b/user/clang/pmmx-musl.patch
new file mode 100644
index 000000000..7286c0ab8
--- /dev/null
+++ b/user/clang/pmmx-musl.patch
@@ -0,0 +1,12 @@
+--- 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
+@@ -528,6 +528,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
new file mode 100644
index 000000000..59f300ebc
--- /dev/null
+++ b/user/clang/ppc64-elfv2.patch
@@ -0,0 +1,38 @@
+--- 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 @@
+ ABI = "elfv2";
+ } else {
+ resetDataLayout("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
+@@ -1745,7 +1745,7 @@
+ break;
+ }
+
+- ABIName = "elfv1";
++ ABIName = (getToolChain().getTriple().isMusl()) ? "elfv2" : "elfv1";
+ break;
+ }
+ case llvm::Triple::ppc64le: