31 lines
910 B
Diff
31 lines
910 B
Diff
--- clang/lib/Basic/Targets/PPC.h
|
|
+++ clang/lib/Basic/Targets/PPC.h
|
|
@@ -358,7 +358,10 @@ public:
|
|
ABI = "elfv2";
|
|
} else {
|
|
resetDataLayout("E-m:e-i64:64-n32:64");
|
|
- ABI = "elfv1";
|
|
+ if (Triple.getEnvironment() == llvm::Triple::Musl)
|
|
+ ABI = "elfv2";
|
|
+ else
|
|
+ ABI = "elfv1";
|
|
}
|
|
|
|
switch (getTriple().getOS()) {
|
|
diff --git a/tools/clang/lib/Driver/ToolChains/Clang.cpp b/tools/clang/lib/Driver/ToolChains/Clang.cpp
|
|
index 8e9c4c6a..40817ec3 100644
|
|
--- clang/lib/Driver/ToolChains/Clang.cpp
|
|
+++ clang/lib/Driver/ToolChains/Clang.cpp
|
|
@@ -1618,7 +1618,10 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
|
|
break;
|
|
}
|
|
|
|
- ABIName = "elfv1";
|
|
+ if (getToolChain().getTriple().getEnvironment() == llvm::Triple::Musl)
|
|
+ ABIName = "elfv2";
|
|
+ else
|
|
+ ABIName = "elfv1";
|
|
break;
|
|
}
|
|
case llvm::Triple::ppc64le:
|