Skip to content

Commit 930de38

Browse files
committed
Merge #662
662: WIP: Fix tier3s r=Susurrus This handles the low-hanging fruit. rust-lang/libc#654 needs to land and there's a bit of work necessary for the syscall and ioctl errors.
2 parents 46e77b5 + c83b33a commit 930de38

File tree

5 files changed

+32
-7
lines changed

5 files changed

+32
-7
lines changed

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ matrix:
5050
- env: TARGET=arm-unknown-linux-gnueabi
5151
rust: 1.13.0
5252
- env: TARGET=arm-unknown-linux-musleabi
53-
rust: 1.13.0
53+
rust: 1.14.0
5454
- env: TARGET=armv7-unknown-linux-gnueabihf
5555
rust: 1.13.0
5656
- env: TARGET=i686-unknown-linux-gnu
@@ -131,7 +131,7 @@ matrix:
131131
- env: TARGET=mips64el-unknown-linux-gnuabi64
132132
rust: 1.13.0
133133
- env: TARGET=arm-unknown-linux-musleabi
134-
rust: 1.13.0
134+
rust: 1.14.0
135135
- env: TARGET=s390x-unknown-linux-gnu
136136
rust: 1.13.0
137137

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Tier 2:
7777

7878
Tier 3:
7979
* aarch64-apple-ios
80-
* arm-unknown-linux-musleabi
80+
* arm-unknown-linux-musleabi (requires Rust >= 1.14)
8181
* armv7-apple-ios
8282
* armv7s-apple-ios
8383
* i386-apple-ios

src/sys/ioctl/platform/linux.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
pub const NRBITS: u32 = 8;
22
pub const TYPEBITS: u32 = 8;
33

4-
#[cfg(any(target_arch = "mips", target_arch = "powerpc", target_arch = "powerpc64"))]
4+
#[cfg(any(target_arch = "mips", target_arch = "mips64", target_arch = "powerpc", target_arch = "powerpc64"))]
55
mod consts {
66
pub const NONE: u8 = 1;
77
pub const READ: u8 = 2;
@@ -12,16 +12,19 @@ mod consts {
1212

1313
#[cfg(not(any(target_arch = "powerpc",
1414
target_arch = "mips",
15+
target_arch = "mips64",
1516
target_arch = "x86",
1617
target_arch = "arm",
1718
target_arch = "x86_64",
1819
target_arch = "powerpc64",
20+
target_arch = "s390x",
1921
target_arch = "aarch64")))]
2022
use this_arch_not_supported;
2123

2224
// "Generic" ioctl protocol
2325
#[cfg(any(target_arch = "x86",
2426
target_arch = "arm",
27+
target_arch = "s390x",
2528
target_arch = "x86_64",
2629
target_arch = "aarch64"))]
2730
mod consts {

src/sys/signal.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ pub enum Signal {
3232
SIGPIPE = libc::SIGPIPE,
3333
SIGALRM = libc::SIGALRM,
3434
SIGTERM = libc::SIGTERM,
35-
#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(target_arch = "mips")))]
35+
#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(any(target_arch = "mips", target_arch = "mips64"))))]
3636
SIGSTKFLT = libc::SIGSTKFLT,
3737
SIGCHLD = libc::SIGCHLD,
3838
SIGCONT = libc::SIGCONT,
@@ -58,7 +58,7 @@ pub enum Signal {
5858

5959
pub use self::Signal::*;
6060

61-
#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(target_arch = "mips")))]
61+
#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(any(target_arch = "mips", target_arch = "mips64"))))]
6262
const SIGNALS: [Signal; 31] = [
6363
SIGHUP,
6464
SIGINT,
@@ -91,7 +91,7 @@ const SIGNALS: [Signal; 31] = [
9191
SIGIO,
9292
SIGPWR,
9393
SIGSYS];
94-
#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), target_arch = "mips"))]
94+
#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), any(target_arch = "mips", target_arch = "mips64")))]
9595
const SIGNALS: [Signal; 30] = [
9696
SIGHUP,
9797
SIGINT,

src/sys/syscall.rs

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ mod arch {
4444
pub static MEMFD_CREATE: Syscall = 385;
4545
}
4646

47+
// Rust on mips uses the N32 ABI
4748
#[cfg(target_arch = "mips")]
4849
mod arch {
4950
use libc::c_long;
@@ -54,6 +55,17 @@ mod arch {
5455
pub static MEMFD_CREATE: Syscall = 354;
5556
}
5657

58+
// Rust on mips64 uses the N64 ABI
59+
#[cfg(target_arch = "mips64")]
60+
mod arch {
61+
use libc::c_long;
62+
63+
pub type Syscall = c_long;
64+
65+
pub static SYSPIVOTROOT: Syscall = 151;
66+
pub static MEMFD_CREATE: Syscall = 314;
67+
}
68+
5769
#[cfg(any(target_arch = "powerpc", target_arch = "powerpc64"))]
5870
mod arch {
5971
use libc::c_long;
@@ -64,6 +76,16 @@ mod arch {
6476
pub static MEMFD_CREATE: Syscall = 360;
6577
}
6678

79+
#[cfg(target_arch = "s390x")]
80+
mod arch {
81+
use libc::c_long;
82+
83+
pub type Syscall = c_long;
84+
85+
pub static SYSPIVOTROOT: Syscall = 217;
86+
pub static MEMFD_CREATE: Syscall = 350;
87+
}
88+
6789
extern {
6890
pub fn syscall(num: Syscall, ...) -> c_int;
6991
}

0 commit comments

Comments
 (0)