summaryrefslogtreecommitdiff
path: root/user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-09-19 02:31:46 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2018-09-25 00:08:16 +0000
commitcd980d29292f8f5d6bb8bef5773ce91b95bfb90a (patch)
tree7eeb0fd1825894538eea675625a9f3009f3fca9d /user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch
parent63266fdc6f2014cc6dfd0f983e13de7c378bc708 (diff)
downloadpackages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.gz
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.bz2
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.tar.xz
packages-cd980d29292f8f5d6bb8bef5773ce91b95bfb90a.zip
user/rust: new package
Diffstat (limited to 'user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch')
-rw-r--r--user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch43
1 files changed, 43 insertions, 0 deletions
diff --git a/user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch b/user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch
new file mode 100644
index 000000000..5841dfaf5
--- /dev/null
+++ b/user/rust/0016-Use-ELFv2-ABI-on-powerpc64-musl-Rust-half.patch
@@ -0,0 +1,43 @@
+From 616f6627b1489fbf87f867cc9b7a2c870c64f06f Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 8 Aug 2018 22:06:18 -0500
+Subject: [PATCH 16/28] Use ELFv2 ABI on powerpc64 musl (Rust half)
+
+---
+ 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
+