Rollup merge of #76798 - alistair23:alistair/rv32-linux, r=jyn514
Build fixes for RISC-V 32-bit Linux support This fixes build issues with the 32-bit RISC-V port.
This commit is contained in:
commit
b4c3f409af
|
@ -120,7 +120,7 @@ const UNWIND_DATA_REG: (i32, i32) = (24, 25); // I0, I1
|
|||
#[cfg(target_arch = "hexagon")]
|
||||
const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1
|
||||
|
||||
#[cfg(target_arch = "riscv64")]
|
||||
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
|
||||
const UNWIND_DATA_REG: (i32, i32) = (10, 11); // x10, x11
|
||||
|
||||
// The following code is based on GCC's C and C++ personality routines. For reference, see:
|
||||
|
|
|
@ -234,7 +234,8 @@ mod arch {
|
|||
target_arch = "mips64",
|
||||
target_arch = "s390x",
|
||||
target_arch = "sparc64",
|
||||
target_arch = "riscv64"
|
||||
target_arch = "riscv64",
|
||||
target_arch = "riscv32"
|
||||
))]
|
||||
mod arch {
|
||||
pub use libc::{blkcnt_t, blksize_t, ino_t, nlink_t, off_t, stat, time_t};
|
||||
|
|
|
@ -22,7 +22,8 @@ mod tests;
|
|||
target_arch = "powerpc",
|
||||
target_arch = "powerpc64",
|
||||
target_arch = "s390x",
|
||||
target_arch = "riscv64"
|
||||
target_arch = "riscv64",
|
||||
target_arch = "riscv32"
|
||||
)
|
||||
),
|
||||
all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
|
||||
|
@ -65,7 +66,8 @@ pub type c_char = u8;
|
|||
target_arch = "powerpc",
|
||||
target_arch = "powerpc64",
|
||||
target_arch = "s390x",
|
||||
target_arch = "riscv64"
|
||||
target_arch = "riscv64",
|
||||
target_arch = "riscv32"
|
||||
)
|
||||
),
|
||||
all(target_os = "android", any(target_arch = "aarch64", target_arch = "arm")),
|
||||
|
|
|
@ -14,7 +14,8 @@ use crate::ptr;
|
|||
target_arch = "powerpc64",
|
||||
target_arch = "asmjs",
|
||||
target_arch = "wasm32",
|
||||
target_arch = "hexagon"
|
||||
target_arch = "hexagon",
|
||||
target_arch = "riscv32"
|
||||
)))]
|
||||
pub const MIN_ALIGN: usize = 8;
|
||||
#[cfg(all(any(
|
||||
|
|
|
@ -54,7 +54,7 @@ pub const unwinder_private_data_size: usize = 2;
|
|||
#[cfg(target_arch = "sparc64")]
|
||||
pub const unwinder_private_data_size: usize = 2;
|
||||
|
||||
#[cfg(target_arch = "riscv64")]
|
||||
#[cfg(any(target_arch = "riscv64", target_arch = "riscv32"))]
|
||||
pub const unwinder_private_data_size: usize = 2;
|
||||
|
||||
#[cfg(target_os = "emscripten")]
|
||||
|
|
|
@ -111,6 +111,7 @@ static TARGETS: &[&str] = &[
|
|||
"riscv32i-unknown-none-elf",
|
||||
"riscv32imc-unknown-none-elf",
|
||||
"riscv32imac-unknown-none-elf",
|
||||
"riscv32gc-unknown-linux-gnu",
|
||||
"riscv64imac-unknown-none-elf",
|
||||
"riscv64gc-unknown-none-elf",
|
||||
"riscv64gc-unknown-linux-gnu",
|
||||
|
|
Loading…
Reference in New Issue