Index: llvm-6.0.1.src/lib/Target/PowerPC/PPCTargetMachine.cpp =================================================================== --- llvm-6.0.1.src/lib/Target/PowerPC/PPCTargetMachine.cpp +++ llvm-6.0.1.src/lib/Target/PowerPC/PPCTargetMachine.cpp @@ -191,6 +191,10 @@ if (TT.isMacOSX()) return PPCTargetMachine::PPC_ABI_UNKNOWN; + // musl uses ELFv2 ABI on both endians. + if (TT.getEnvironment() == Triple::Musl) + return PPCTargetMachine::PPC_ABI_ELFv2; + switch (TT.getArch()) { case Triple::ppc64le: return PPCTargetMachine::PPC_ABI_ELFv2;