fix cross compilation of std

This commit is contained in:
Jorge Aparicio 2016-08-27 01:39:29 -05:00
parent 1b9e9ab1dc
commit 43615a03f3
6 changed files with 19 additions and 3 deletions

View File

@ -77,7 +77,8 @@
#[cfg(all(any(target_arch = "x86",
target_arch = "x86_64",
target_arch = "aarch64",
target_arch = "powerpc64")))]
target_arch = "powerpc64",
target_arch = "mips64")))]
const MIN_ALIGN: usize = 16;
// MALLOCX_ALIGN(a) macro

View File

@ -32,7 +32,8 @@
target_arch = "asmjs")))]
const MIN_ALIGN: usize = 8;
#[cfg(all(any(target_arch = "x86_64",
target_arch = "aarch64")))]
target_arch = "aarch64",
target_arch = "mips64")))]
const MIN_ALIGN: usize = 16;
#[no_mangle]

View File

@ -124,7 +124,7 @@ fn rust_exception_class() -> uw::_Unwind_Exception_Class {
#[cfg(any(target_arch = "arm", target_arch = "aarch64"))]
const UNWIND_DATA_REG: (i32, i32) = (0, 1); // R0, R1 / X0, X1
#[cfg(any(target_arch = "mips", target_arch = "mipsel"))]
#[cfg(any(target_arch = "mips", target_arch = "mipsel", target_arch = "mips64"))]
const UNWIND_DATA_REG: (i32, i32) = (4, 5); // A0, A1
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]

View File

@ -661,6 +661,7 @@ pub mod consts {
/// - arm
/// - aarch64
/// - mips
/// - mips64
/// - powerpc
/// - powerpc64
#[stable(feature = "env", since = "1.0.0")]
@ -928,6 +929,11 @@ mod arch {
pub const ARCH: &'static str = "mips";
}
#[cfg(target_arch = "mips64")]
mod arch {
pub const ARCH: &'static str = "mips64";
}
#[cfg(target_arch = "powerpc")]
mod arch {
pub const ARCH: &'static str = "powerpc";

View File

@ -155,6 +155,11 @@ pub struct stat {
}
}
#[cfg(target_arch = "mips64")]
mod arch {
pub use libc::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t};
}
#[cfg(target_arch = "aarch64")]
mod arch {
use os::raw::{c_long, c_int};

View File

@ -56,6 +56,9 @@ pub enum _Unwind_Reason_Code {
#[cfg(target_arch = "mips")]
pub const unwinder_private_data_size: usize = 2;
#[cfg(target_arch = "mips64")]
pub const unwinder_private_data_size: usize = 2;
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
pub const unwinder_private_data_size: usize = 2;