Skip to content

Commit

Permalink
Auto merge of #1567 - glaubitz:sparc-linux, r=gnzlbg
Browse files Browse the repository at this point in the history
Add initial support for sparc-unknown-linux-gnu

While the Rust compiler already supports the sparc-unknown-linux-gnu target, the libc crate is missing support for it. Let's add it so that Rust can built for this target as well.
  • Loading branch information
bors committed Nov 25, 2019
2 parents c899a79 + 034574c commit 7a12eed
Show file tree
Hide file tree
Showing 6 changed files with 1,004 additions and 2 deletions.
4 changes: 4 additions & 0 deletions src/unix/linux_like/linux/align.rs
Expand Up @@ -62,6 +62,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
target_arch = "x86")),
repr(align(4)))]
Expand All @@ -70,6 +71,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
target_arch = "x86"))),
repr(align(8)))]
Expand All @@ -83,6 +85,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
target_arch = "x86")),
repr(align(4)))]
Expand All @@ -91,6 +94,7 @@ macro_rules! expand_align {
target_arch = "arm",
target_arch = "hexagon",
target_arch = "powerpc",
target_arch = "sparc",
target_arch = "x86_64",
target_arch = "x86"))),
repr(align(8)))]
Expand Down
3 changes: 3 additions & 0 deletions src/unix/linux_like/linux/gnu/b32/mod.rs
Expand Up @@ -262,6 +262,9 @@ cfg_if! {
} else if #[cfg(target_arch = "powerpc")] {
mod powerpc;
pub use self::powerpc::*;
} else if #[cfg(target_arch = "sparc")] {
mod sparc;
pub use self::sparc::*;
} else {
// Unknown target_arch
}
Expand Down
7 changes: 7 additions & 0 deletions src/unix/linux_like/linux/gnu/b32/sparc/align.rs
@@ -0,0 +1,7 @@
s_no_extra_traits! {
#[allow(missing_debug_implementations)]
#[repr(align(8))]
pub struct max_align_t {
priv_: [i64; 3]
}
}

0 comments on commit 7a12eed

Please sign in to comment.