void-packages/srcpkgs/llvm8/files/patches/cfe/cfe-006-ppc64-musl-elfv2.patch
q66 e95a5e9ae4 llvm8: update ppc64 patches to always use elfv2 on big endian
We need this because we target elfv2 with ppc64 glibc as well,
unlike most distributions.

[ci skip]
2019-04-27 17:00:03 +02:00

26 lines
679 B
Diff

--- a/lib/Basic/Targets/PPC.h
+++ b/lib/Basic/Targets/PPC.h
@@ -364,11 +364,10 @@ public:
if ((Triple.getArch() == llvm::Triple::ppc64le)) {
resetDataLayout("e-m:e-i64:64-n32:64");
- ABI = "elfv2";
} else {
resetDataLayout("E-m:e-i64:64-n32:64");
- ABI = "elfv1";
}
+ ABI = "elfv2";
switch (getTriple().getOS()) {
case llvm::Triple::FreeBSD:
--- a/lib/Driver/ToolChains/Clang.cpp
+++ b/lib/Driver/ToolChains/Clang.cpp
@@ -1745,7 +1745,7 @@ void Clang::AddPPCTargetArgs(const ArgList &Args,
break;
}
- ABIName = "elfv1";
+ ABIName = "elfv2";
break;
}
case llvm::Triple::ppc64le: