From 1fefba5e0ba95a4ffe83efbeeb1cd56e978f2ab6 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Mon, 28 Sep 2020 00:05:40 +0200 Subject: [PATCH 1/3] library/{panic_,}unwind: Add definitions for sparc-unknow-linux-gnu --- library/panic_unwind/src/gcc.rs | 2 +- library/unwind/src/libunwind.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/library/panic_unwind/src/gcc.rs b/library/panic_unwind/src/gcc.rs index 1cfd527b5841a..6b88bab8277ee 100644 --- a/library/panic_unwind/src/gcc.rs +++ b/library/panic_unwind/src/gcc.rs @@ -114,7 +114,7 @@ const UNWIND_DATA_REG: (i32, i32) = (3, 4); // R3, R4 / X3, X4 #[cfg(target_arch = "s390x")] const UNWIND_DATA_REG: (i32, i32) = (6, 7); // R6, R7 -#[cfg(target_arch = "sparc64")] +#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] const UNWIND_DATA_REG: (i32, i32) = (24, 25); // I0, I1 #[cfg(target_arch = "hexagon")] diff --git a/library/unwind/src/libunwind.rs b/library/unwind/src/libunwind.rs index dcf4fcd4e5aab..806df572cf944 100644 --- a/library/unwind/src/libunwind.rs +++ b/library/unwind/src/libunwind.rs @@ -51,7 +51,7 @@ pub const unwinder_private_data_size: usize = 2; #[cfg(target_arch = "s390x")] pub const unwinder_private_data_size: usize = 2; -#[cfg(target_arch = "sparc64")] +#[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] pub const unwinder_private_data_size: usize = 2; #[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))] From d9de08d65ceb4d4e9d8d546186eae22ba4c57fa4 Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Mon, 28 Sep 2020 00:08:42 +0200 Subject: [PATCH 2/3] library/std/sys_common: Define MIN_ALIGN for sparc-unknown-linux-gnu --- library/std/src/sys_common/alloc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/sys_common/alloc.rs b/library/std/src/sys_common/alloc.rs index f22476be32560..6c1bc0d839ad3 100644 --- a/library/std/src/sys_common/alloc.rs +++ b/library/std/src/sys_common/alloc.rs @@ -12,6 +12,7 @@ use crate::ptr; target_arch = "mips", target_arch = "powerpc", target_arch = "powerpc64", + target_arch = "sparc", target_arch = "asmjs", target_arch = "wasm32", target_arch = "hexagon", From d25b0364e11064089f30af74da18aae5896a72ea Mon Sep 17 00:00:00 2001 From: John Paul Adrian Glaubitz Date: Mon, 28 Sep 2020 00:14:59 +0200 Subject: [PATCH 3/3] library/std: Set OS raw type definitions for sparc-unknown-linux-gnu --- library/std/src/os/linux/raw.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/os/linux/raw.rs b/library/std/src/os/linux/raw.rs index 4ff3a6e578984..617c4098aa959 100644 --- a/library/std/src/os/linux/raw.rs +++ b/library/std/src/os/linux/raw.rs @@ -29,6 +29,7 @@ pub use self::arch::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t}; target_arch = "x86", target_arch = "le32", target_arch = "powerpc", + target_arch = "sparc", target_arch = "arm", target_arch = "asmjs", target_arch = "wasm32"