Rollup merge of #62814 - androm3da:hexagon_19jul_2019, r=alexcrichton

add support for hexagon-unknown-linux-musl
This commit is contained in:
Mazdak Farrokhzad 2019-07-25 01:05:00 +02:00 committed by GitHub
commit b1a866012d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 110 additions and 2 deletions

View file

@ -975,6 +975,11 @@ mod arch {
pub const ARCH: &str = "wasm32";
}
#[cfg(target_arch = "hexagon")]
mod arch {
pub const ARCH: &'static str = "hexagon";
}
#[cfg(test)]
mod tests {
use super::*;

View file

@ -147,6 +147,62 @@ mod arch {
}
}
#[cfg(target_arch = "hexagon")]
mod arch {
use crate::os::raw::{c_long, c_int, c_longlong, culonglong};
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blkcnt_t = c_longlong;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type blksize_t = c_long;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type ino_t = c_ulonglong;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type nlink_t = c_uint;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type off_t = c_longlong;
#[stable(feature = "raw_ext", since = "1.1.0")] pub type time_t = c_long;
#[repr(C)]
#[derive(Clone)]
#[stable(feature = "raw_ext", since = "1.1.0")]
pub struct stat {
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_dev: ::dev_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ino: ::c_ulonglong,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mode: ::c_uint,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_nlink: ::c_uint,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_uid: ::c_uint,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_gid: ::c_uint,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_rdev: ::c_ulonglong,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub __pad1: ::c_ulong,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_size: ::c_longlong,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blksize: ::blksize_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub __pad2: ::c_int,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_blocks: ::blkcnt_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime: ::time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_atime_nsec: ::c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime: ::time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_mtime_nsec: ::c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime: ::time_t,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub st_ctime_nsec: ::c_long,
#[stable(feature = "raw_ext", since = "1.1.0")]
pub __pad3: [::c_int;2],
}
}
#[cfg(any(target_arch = "mips64",
target_arch = "s390x",
target_arch = "sparc64"))]

View file

@ -11,6 +11,7 @@
#[doc(include = "os/raw/char.md")]
#[cfg(any(all(target_os = "linux", any(target_arch = "aarch64",
target_arch = "arm",
target_arch = "hexagon",
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "s390x")),
@ -34,6 +35,7 @@
#[doc(include = "os/raw/char.md")]
#[cfg(not(any(all(target_os = "linux", any(target_arch = "aarch64",
target_arch = "arm",
target_arch = "hexagon",
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "s390x")),

View file

@ -12,7 +12,8 @@ use crate::ptr;
target_arch = "powerpc",
target_arch = "powerpc64",
target_arch = "asmjs",
target_arch = "wasm32")))]
target_arch = "wasm32",
target_arch = "hexagon")))]
pub const MIN_ALIGN: usize = 8;
#[cfg(all(any(target_arch = "x86_64",
target_arch = "aarch64",