1 From de93abe8a0d9dc7878a48f61b9e3ae4a923020f6 Mon Sep 17 00:00:00 2001
2 From: q66 <daniel@octaforge.org>
3 Date: Sun, 3 May 2020 18:08:09 +0200
4 Subject: [PATCH 11/15] Use ELFv2 ABI on all powerpc64 targets
6 This patches librustc_target so that ELFv2 is used everywhere, matching our
7 LLVM. While this is not perfect (it does not allow rustc to compile legacy
8 binaries), rustc never requests specific ABI from llvm in the first place,
9 so at least match the environment we have.
11 diff --git a/compiler/rustc_target/src/abi/call/powerpc64.rs b/compiler/rustc_target/src/abi/call/powerpc64.rs
12 index 749eea0ef..1dfa3cbd0 100644
13 --- a/compiler/rustc_target/src/abi/call/powerpc64.rs
14 +++ b/compiler/rustc_target/src/abi/call/powerpc64.rs
16 // need to be fixed when PowerPC vector support is added.
18 use crate::abi::call::{Align, ArgAbi, FnAbi, Reg, RegKind, Uniform};
19 -use crate::abi::{Endian, HasDataLayout, TyAbiInterface};
20 +use crate::abi::{HasDataLayout, TyAbiInterface};
21 use crate::spec::HasTargetSpec;
23 #[derive(Debug, Clone, Copy, PartialEq)]
24 @@ -91,14 +91,7 @@ where
25 Ty: TyAbiInterface<'a, C> + Copy,
26 C: HasDataLayout + HasTargetSpec,
28 - let abi = if cx.target_spec().env == "musl" {
31 - match cx.data_layout().endian {
32 - Endian::Big => ELFv1,
33 - Endian::Little => ELFv2,
38 classify(cx, &mut fn_abi.ret, abi, true);