summaryrefslogtreecommitdiff
path: root/user/clang/ppc64-elfv2.patch
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/clang/ppc64-elfv2.patch
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/clang/ppc64-elfv2.patch')
-rw-r--r--user/clang/ppc64-elfv2.patch38
1 files changed, 38 insertions, 0 deletions
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: