Skip to content

Commit 7a12eed

Browse files
committed
Auto merge of #1567 - glaubitz:sparc-linux, r=gnzlbg
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.
2 parents c899a79 + 034574c commit 7a12eed

File tree

6 files changed

+1004
-2
lines changed

6 files changed

+1004
-2
lines changed

src/unix/linux_like/linux/align.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ macro_rules! expand_align {
6262
target_arch = "arm",
6363
target_arch = "hexagon",
6464
target_arch = "powerpc",
65+
target_arch = "sparc",
6566
target_arch = "x86_64",
6667
target_arch = "x86")),
6768
repr(align(4)))]
@@ -70,6 +71,7 @@ macro_rules! expand_align {
7071
target_arch = "arm",
7172
target_arch = "hexagon",
7273
target_arch = "powerpc",
74+
target_arch = "sparc",
7375
target_arch = "x86_64",
7476
target_arch = "x86"))),
7577
repr(align(8)))]
@@ -83,6 +85,7 @@ macro_rules! expand_align {
8385
target_arch = "arm",
8486
target_arch = "hexagon",
8587
target_arch = "powerpc",
88+
target_arch = "sparc",
8689
target_arch = "x86_64",
8790
target_arch = "x86")),
8891
repr(align(4)))]
@@ -91,6 +94,7 @@ macro_rules! expand_align {
9194
target_arch = "arm",
9295
target_arch = "hexagon",
9396
target_arch = "powerpc",
97+
target_arch = "sparc",
9498
target_arch = "x86_64",
9599
target_arch = "x86"))),
96100
repr(align(8)))]

src/unix/linux_like/linux/gnu/b32/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,9 @@ cfg_if! {
262262
} else if #[cfg(target_arch = "powerpc")] {
263263
mod powerpc;
264264
pub use self::powerpc::*;
265+
} else if #[cfg(target_arch = "sparc")] {
266+
mod sparc;
267+
pub use self::sparc::*;
265268
} else {
266269
// Unknown target_arch
267270
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
s_no_extra_traits! {
2+
#[allow(missing_debug_implementations)]
3+
#[repr(align(8))]
4+
pub struct max_align_t {
5+
priv_: [i64; 3]
6+
}
7+
}

0 commit comments

Comments
 (0)