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; }