diff options
Diffstat (limited to 'user/clang/ppc64-elfv2.patch')
-rw-r--r-- | user/clang/ppc64-elfv2.patch | 38 |
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: |