diff options
author | A. Wilcox <awilcox@wilcox-tech.com> | 2018-10-11 06:07:46 +0000 |
---|---|---|
committer | A. Wilcox <awilcox@wilcox-tech.com> | 2018-10-11 06:07:46 +0000 |
commit | 11597b8939720fb5246c41482d873bce2ef8235e (patch) | |
tree | 5e68deee8c43ec66acf35f8eca89f5cc71ff81d7 /user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch | |
parent | 3c5a215212a76932481c316d1259f4dc15c061fa (diff) | |
parent | 2323b0da26e293bb4d5a7a4ad8afed85a599d11d (diff) | |
download | packages-11597b8939720fb5246c41482d873bce2ef8235e.tar.gz packages-11597b8939720fb5246c41482d873bce2ef8235e.tar.bz2 packages-11597b8939720fb5246c41482d873bce2ef8235e.tar.xz packages-11597b8939720fb5246c41482d873bce2ef8235e.zip |
Merge branch 'rust' into 'master'
user/rust: Bump to 1.29.1 plus fixes for i586, ppc32
See merge request !85
Diffstat (limited to 'user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch')
-rw-r--r-- | user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch b/user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch new file mode 100644 index 000000000..dd11dd568 --- /dev/null +++ b/user/rust/0017-Use-the-ELFv2-ABI-on-powerpc64-musl.patch @@ -0,0 +1,43 @@ +From e1214a04a9f8a30b67665ef353e3934e15e24a16 Mon Sep 17 00:00:00 2001 +From: Samuel Holland <samuel@sholland.org> +Date: Wed, 8 Aug 2018 22:06:18 -0500 +Subject: [PATCH 17/29] Use the ELFv2 ABI on powerpc64 musl + +--- + src/librustc_target/abi/call/powerpc64.rs | 12 ++++++++---- + 1 file changed, 8 insertions(+), 4 deletions(-) + +diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs +index 0c5ec77a39..4851b25fe7 100644 +--- a/src/librustc_target/abi/call/powerpc64.rs ++++ b/src/librustc_target/abi/call/powerpc64.rs +@@ -14,6 +14,7 @@ + + use abi::call::{FnType, ArgType, Reg, RegKind, Uniform}; + use abi::{Align, Endian, HasDataLayout, LayoutOf, TyLayout, TyLayoutMethods}; ++use spec::HasTargetSpec; + + #[derive(Debug, Clone, Copy, PartialEq)] + enum ABI { +@@ -136,11 +137,14 @@ fn classify_arg_ty<'a, Ty, C>(cx: C, arg: &mut ArgType<'a, Ty>, abi: ABI) + + pub fn compute_abi_info<'a, Ty, C>(cx: C, fty: &mut FnType<'a, Ty>) + where Ty: TyLayoutMethods<'a, C> + Copy, +- C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout ++ C: LayoutOf<Ty = Ty, TyLayout = TyLayout<'a, Ty>> + HasDataLayout + HasTargetSpec + { +- let abi = match cx.data_layout().endian { +- Endian::Big => ELFv1, +- Endian::Little => ELFv2, ++ let abi = match cx.target_spec().target_env { ++ "musl" => ELFv2, ++ _ => match cx.data_layout().endian { ++ Endian::Big => ELFv1, ++ Endian::Little => ELFv2 ++ } + }; + + if !fty.ret.is_ignore() { +-- +2.18.0 + |