Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for arm-unknown-linux-musleabi{,hf} targets. #264

Merged
merged 1 commit into from Apr 18, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 6 additions & 3 deletions src/unix/mod.rs
Expand Up @@ -55,7 +55,9 @@ s! {
pub ru_nvcsw: c_long,
pub ru_nivcsw: c_long,

#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))]
__reserved: [c_long; 16],
}

Expand Down Expand Up @@ -149,8 +151,9 @@ cfg_if! {
} else if #[cfg(all(not(stdbuild), feature = "use_std"))] {
// cargo build, don't pull in anything extra as the libstd dep
// already pulls in all libs.
} else if #[cfg(all(target_env = "musl", not(any(target_arch = "mips",
target_arch = "arm"))))] {
} else if #[cfg(any(all(target_env = "musl", not(target_arch = "mips")),
target_env = "musleabi",
target_env = "musleabihf"))] {
#[link(name = "c", kind = "static")]
extern {}
} else if #[cfg(target_os = "emscripten")] {
Expand Down
10 changes: 8 additions & 2 deletions src/unix/notbsd/linux/mod.rs
Expand Up @@ -93,9 +93,13 @@ s! {
}

pub struct pthread_cond_t {
#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))]
__align: [*const ::c_void; 0],
#[cfg(not(target_env = "musl"))]
#[cfg(not(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf")))]
__align: [::c_longlong; 0],
size: [u8; __SIZEOF_PTHREAD_COND_T],
}
Expand Down Expand Up @@ -615,6 +619,8 @@ extern {

cfg_if! {
if #[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf",
target_os = "emscripten"))] {
mod musl;
pub use self::musl::*;
Expand Down
16 changes: 12 additions & 4 deletions src/unix/notbsd/mod.rs
Expand Up @@ -99,13 +99,21 @@ s! {

pub struct sched_param {
pub sched_priority: ::c_int,
#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_low_priority: ::c_int,
#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_repl_period: ::timespec,
#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_init_budget: ::timespec,
#[cfg(target_env = "musl")]
#[cfg(any(target_env = "musl",
target_env = "musleabi",
target_env = "musleabihf"))]
pub sched_ss_max_repl: ::c_int,
}

Expand Down