From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001 From: q66 Date: Sun, 3 May 2020 18:08:09 +0200 Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets This patches librustc_target so that ELFv2 is used everywhere, matching our LLVM. While this is not perfect (it does not allow rustc to compile legacy binaries), rustc never requests specific ABI from llvm in the first place, so at least match the environment we have. --- compiler/rustc_target/src/abi/call/powerpc64.rs | 9 +-------- .../rustc_target/src/spec/powerpc64_unknown_linux_gnu.rs | 6 +----- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs index 359bb8fc0..414c70cea 100644 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs @@ -119,14 +119,7 @@ where Ty: TyAbiInterface<'a, C> + Copy, C: HasDataLayout + HasTargetSpec, { - let abi = if cx.target_spec().env == "musl" { - ELFv2 - } else { - match cx.data_layout().endian { - Endian::Big => ELFv1, - Endian::Little => ELFv2, - } - }; + let abi = ELFv2; if !fn_abi.ret.is_ignore() { classify_ret(cx, &mut fn_abi.ret, abi);