diff options
| author | bors <bors@rust-lang.org> | 2016-09-02 03:01:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-02 03:01:48 -0700 |
| commit | 689c6c48ecd3d89d120c6aecf8b69222920e4520 (patch) | |
| tree | 8bd8088e0fd7273a62b3123ebb9ea5ef1a72405d /src/liballoc_system | |
| parent | 022cb6d11d7d3529fc09283d058e66017dadeb8c (diff) | |
| parent | bbf2c3c31f3dd7703f4a13724bada979a921a65f (diff) | |
| download | rust-689c6c48ecd3d89d120c6aecf8b69222920e4520.tar.gz rust-689c6c48ecd3d89d120c6aecf8b69222920e4520.zip | |
Auto merge of #36024 - japaric:mips64, r=alexcrichton
add mips64-gnu and mips64el-gnu targets
With this commit one can build no_core (and probably no_std as well)
Rust programs for these targets. It's not yet possible to cross compile
std for these targets because rust-lang/libc doesn't know about the
mips64 architecture.
These targets have been tested by cross compiling the "smallest hello"
program (see code below) and then running it under QEMU.
``` rust
extern {
fn puts(_: *const u8);
}
fn start(_: isize, _: *const *const u8) -> isize {
unsafe {
let msg = b"Hello, world!\0";
puts(msg as *const _ as *const u8);
}
0
}
trait Copy {}
trait Sized {}
```
cc #36015
r? @alexcrichton
cc @brson
The cabi stuff is likely wrong. I just copied cabi_mips source and changed some `4`s to `8`s and `32`s to `64`s. It was enough to get libc's `puts` to work but I'd like someone familiar with this module to check it.
Diffstat (limited to 'src/liballoc_system')
| -rw-r--r-- | src/liballoc_system/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/liballoc_system/lib.rs b/src/liballoc_system/lib.rs index 9eade937bfb..2c0c6d068ca 100644 --- a/src/liballoc_system/lib.rs +++ b/src/liballoc_system/lib.rs @@ -32,7 +32,8 @@ target_arch = "asmjs")))] const MIN_ALIGN: usize = 8; #[cfg(all(any(target_arch = "x86_64", - target_arch = "aarch64")))] + target_arch = "aarch64", + target_arch = "mips64")))] const MIN_ALIGN: usize = 16; #[no_mangle] |
