diff options
Diffstat (limited to 'user/clang/ppc64-elfv2.patch')
-rw-r--r-- | user/clang/ppc64-elfv2.patch | 33 |
1 files changed, 3 insertions, 30 deletions
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()) { |