Skip to content

Commit 43615a0

Browse files
author
Jorge Aparicio
committed
fix cross compilation of std
1 parent 1b9e9ab commit 43615a0

File tree

6 files changed

+19
-3
lines changed

6 files changed

+19
-3
lines changed

src/liballoc_jemalloc/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@ const MIN_ALIGN: usize = 8;
7777
#[cfg(all(any(target_arch = "x86",
7878
target_arch = "x86_64",
7979
target_arch = "aarch64",
80-
target_arch = "powerpc64")))]
80+
target_arch = "powerpc64",
81+
target_arch = "mips64")))]
8182
const MIN_ALIGN: usize = 16;
8283

8384
// MALLOCX_ALIGN(a) macro

src/liballoc_system/lib.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@
3232
target_arch = "asmjs")))]
3333
const MIN_ALIGN: usize = 8;
3434
#[cfg(all(any(target_arch = "x86_64",
35-
target_arch = "aarch64")))]
35+
target_arch = "aarch64",
36+
target_arch = "mips64")))]
3637
const MIN_ALIGN: usize = 16;
3738

3839
#[no_mangle]

src/libpanic_unwind/gcc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const UNWIND_DATA_REG: (i32, i32) = (0, 1); // RAX, RDX
124124
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
125125
const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1 / X0, X1
126126

127-
#[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
127+
#[cfg(any(target_arch = "mips", target_arch = "mipsel", target_arch = "mips64"))]
128128
const UNWIND_DATA_REG: (i32, i32) = (4, 5); // A0, A1
129129

130130
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]

src/libstd/env.rs

+6
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,7 @@ pub mod consts {
661661
/// - arm
662662
/// - aarch64
663663
/// - mips
664+
/// - mips64
664665
/// - powerpc
665666
/// - powerpc64
666667
#[stable(feature = "env", since = "1.0.0")]
@@ -928,6 +929,11 @@ mod arch {
928929
pub const ARCH: &'static str = "mips";
929930
}
930931

932+
#[cfg(target_arch = "mips64")]
933+
mod arch {
934+
pub const ARCH: &'static str = "mips64";
935+
}
936+
931937
#[cfg(target_arch = "powerpc")]
932938
mod arch {
933939
pub const ARCH: &'static str = "powerpc";

src/libstd/os/linux/raw.rs

+5
Original file line numberDiff line numberDiff line change
@@ -155,6 +155,11 @@ mod arch {
155155
}
156156
}
157157

158+
#[cfg(target_arch = "mips64")]
159+
mod arch {
160+
pub use libc::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
161+
}
162+
158163
#[cfg(target_arch = "aarch64")]
159164
mod arch {
160165
use os::raw::{c_long, c_int};

src/libunwind/libunwind.rs

+3
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,9 @@ pub const unwinder_private_data_size: usize = 2;
5656
#[cfg(target_arch = "mips")]
5757
pub const unwinder_private_data_size: usize = 2;
5858

59+
#[cfg(target_arch = "mips64")]
60+
pub const unwinder_private_data_size: usize = 2;
61+
5962
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
6063
pub const unwinder_private_data_size: usize = 2;
6164

0 commit comments

Comments
 (0)