diff options
| author | bors <bors@rust-lang.org> | 2017-01-01 09:56:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2017-01-01 09:56:18 +0000 |
| commit | e1279a0b30a6a36822ecf7c7cc683953e1239745 (patch) | |
| tree | 39c4f3349ee7128c7d9e546b1a93eb05326fa913 /src/libstd | |
| parent | e227433dc39ab13aa2368814169c049b8f876825 (diff) | |
| parent | b14785d3d0e3093983f6d6e266b754e1b536da10 (diff) | |
| download | rust-e1279a0b30a6a36822ecf7c7cc683953e1239745.tar.gz rust-e1279a0b30a6a36822ecf7c7cc683953e1239745.zip | |
Auto merge of #38726 - japaric:sparc64, r=sanxiyn
sparc64-linux support This is built on top of #38656 and depends on rust-lang/libc#483 Hello world works. The libc-test test suite passes. `panic!` doesn't fully work: ``` $ qemu-sparc64-static ./panic thread 'main' panicked at 'explicit panic', panic.rs:1 note: Run with `RUST_BACKTRACE=1` for a backtrace. Illegal instruction (core dumped) ``` Backtraces don't work either, probably related to the previous point: ``` $ export RUST_BACKTRACE=1 $ qemu-sparc64-static ./panic thread 'main' panicked at 'explicit panic', panic.rs:1 stack backtrace: Illegal instruction (core dumped) ``` r? @alexcrichton @jakllsch Does panicking / backtraces work on sparc64-netbsd? cc @glaubitz
Diffstat (limited to 'src/libstd')
| -rw-r--r-- | src/libstd/env.rs | 6 | ||||
| -rw-r--r-- | src/libstd/os/linux/raw.rs | 9 |
2 files changed, 9 insertions, 6 deletions
diff --git a/src/libstd/env.rs b/src/libstd/env.rs index 0521f301321..d843d97420a 100644 --- a/src/libstd/env.rs +++ b/src/libstd/env.rs @@ -712,6 +712,7 @@ pub mod consts { /// - powerpc /// - powerpc64 /// - s390x + /// - sparc64 #[stable(feature = "env", since = "1.0.0")] pub const ARCH: &'static str = super::arch::ARCH; @@ -843,6 +844,11 @@ mod arch { pub const ARCH: &'static str = "s390x"; } +#[cfg(target_arch = "sparc64")] +mod arch { + pub const ARCH: &'static str = "sparc64"; +} + #[cfg(target_arch = "le32")] mod arch { pub const ARCH: &'static str = "le32"; diff --git a/src/libstd/os/linux/raw.rs b/src/libstd/os/linux/raw.rs index 7c9274d0601..bb1830a147e 100644 --- a/src/libstd/os/linux/raw.rs +++ b/src/libstd/os/linux/raw.rs @@ -157,12 +157,9 @@ mod arch { } } -#[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 = "s390x")] +#[cfg(any(target_arch = "mips64", + target_arch = "s390x", + target_arch = "sparc64"))] mod arch { pub use libc::{off_t, ino_t, nlink_t, blksize_t, blkcnt_t, stat, time_t}; } |
