b2652078b5
This involves a few things. One is updating the internal-llvm patch to match what we have elsewhere, the other is updating librustc_target code to emit ELFv2 on glibc in our case. This is not handled perfectly (see comment) but it's best we can do for now. Also bump, so that it gets rebuilt and cross-compiling works. [ci skip] Closes: #11394 [via git-merge-pr]
18 lines
696 B
Diff
18 lines
696 B
Diff
This patches LLVM to use ELFv2 on ppc64 uncoditionally unless overridden. We
|
|
need this because unlike most distros we use ELFv2 for both glibc and musl
|
|
on big endian ppc64.
|
|
|
|
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
|
|
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
|
|
@@ -197,9 +197,9 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
|
|
|
|
switch (TT.getArch()) {
|
|
case Triple::ppc64le:
|
|
- return PPCTargetMachine::PPC_ABI_ELFv2;
|
|
case Triple::ppc64:
|
|
- return PPCTargetMachine::PPC_ABI_ELFv1;
|
|
+ /* we use elfv2 by default for both endians and both libcs */
|
|
+ return PPCTargetMachine::PPC_ABI_ELFv2;
|
|
default:
|
|
return PPCTargetMachine::PPC_ABI_UNKNOWN;
|
|
}
|