summaryrefslogtreecommitdiff
path: root/user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch
diff options
context:
space:
mode:
authorSamuel Holland <samuel@sholland.org>2018-11-10 22:34:26 +0000
committerSamuel Holland <samuel@sholland.org>2018-11-13 02:03:14 +0000
commit18b490b7953735328501c6f7e54522a91220caf3 (patch)
treef075f78e11183fb78348b69d07affde16b828d81 /user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch
parent939576404a1853bf009789059c34288420bfd6ec (diff)
downloadpackages-18b490b7953735328501c6f7e54522a91220caf3.tar.gz
packages-18b490b7953735328501c6f7e54522a91220caf3.tar.bz2
packages-18b490b7953735328501c6f7e54522a91220caf3.tar.xz
packages-18b490b7953735328501c6f7e54522a91220caf3.zip
user/rust: Bump to 1.30.1
Diffstat (limited to 'user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch')
-rw-r--r--user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch50
1 files changed, 50 insertions, 0 deletions
diff --git a/user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch b/user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch
new file mode 100644
index 000000000..667e9b404
--- /dev/null
+++ b/user/rust/0009-Use-the-ELFv2-ABI-on-powerpc64-musl.patch
@@ -0,0 +1,50 @@
+From 4fc3ffc1ec745c25b2727a076380e237beb2515c Mon Sep 17 00:00:00 2001
+From: Samuel Holland <samuel@sholland.org>
+Date: Wed, 8 Aug 2018 22:06:18 -0500
+Subject: [PATCH 09/24] Use the ELFv2 ABI on powerpc64 musl
+
+---
+ src/librustc_target/abi/call/powerpc64.rs | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+diff --git a/src/librustc_target/abi/call/powerpc64.rs b/src/librustc_target/abi/call/powerpc64.rs
+index 934d2b1138..18d14495e2 100644
+--- a/src/librustc_target/abi/call/powerpc64.rs
++++ b/src/librustc_target/abi/call/powerpc64.rs
+@@ -14,11 +14,12 @@
+
+ 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 {
+ ELFv1, // original ABI used for powerpc64 (big-endian)
+- ELFv2, // newer ABI used for powerpc64le
++ ELFv2, // newer ABI used for powerpc64le and musl (both endians)
+ }
+ use self::ABI::*;
+
+@@ -131,11 +132,15 @@ 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 = if cx.target_spec().target_env == "musl" {
++ ELFv2
++ } else {
++ match cx.data_layout().endian {
++ Endian::Big => ELFv1,
++ Endian::Little => ELFv2
++ }
+ };
+
+ if !fty.ret.is_ignore() {
+--
+2.18.0
+