sparc64-linux support

This commit is contained in:
Jorge Aparicio 2016-12-30 01:34:06 -05:00
parent 8aef058329
commit 728ec85e9a
6 changed files with 43 additions and 7 deletions

View file

@ -0,0 +1 @@
# rustbuild-only target

View file

@ -151,6 +151,12 @@ fn main() {
cmd.arg(format!("--host={}", build_helper::gnu_target(&target)));
cmd.arg(format!("--build={}", build_helper::gnu_target(&host)));
// for some reason, jemalloc configure doesn't detect this value
// automatically for this target
if target == "sparc64-unknown-linux-gnu" {
cmd.arg("--with-lg-quantum=4");
}
run(&mut cmd);
let mut make = Command::new(build_helper::make(&host));
make.current_dir(&build_dir)

@ -1 +1 @@
Subproject commit e49e9bb7c3d9c7f2fd893f0ee0db81617b8db21f
Subproject commit 98589876259e19f13eab81b033ced95bbb6deca0

View file

@ -157,6 +157,8 @@ fn $module() {
("mips-unknown-linux-uclibc", mips_unknown_linux_uclibc),
("mipsel-unknown-linux-uclibc", mipsel_unknown_linux_uclibc),
("sparc64-unknown-linux-gnu", sparc64_unknown_linux_gnu),
("i686-linux-android", i686_linux_android),
("arm-linux-androideabi", arm_linux_androideabi),
("armv7-linux-androideabi", armv7_linux_androideabi),

View file

@ -0,0 +1,30 @@
// Copyright 2016 The Rust Project Developers. See the COPYRIGHT
// file at the top-level directory of this distribution and at
// http://rust-lang.org/COPYRIGHT.
//
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
// option. This file may not be copied, modified, or distributed
// except according to those terms.
use target::{Target, TargetResult};
pub fn target() -> TargetResult {
let mut base = super::linux_base::opts();
base.cpu = "v9".to_string();
base.max_atomic_width = Some(64);
base.exe_allocation_crate = "alloc_system".to_string();
Ok(Target {
llvm_target: "sparc64-unknown-linux-gnu".to_string(),
target_endian: "big".to_string(),
target_pointer_width: "64".to_string(),
data_layout: "E-m:e-i64:64-n32:64-S128".to_string(),
arch: "sparc64".to_string(),
target_os: "linux".to_string(),
target_env: "gnu".to_string(),
target_vendor: "unknown".to_string(),
options: base,
})
}

View file

@ -157,12 +157,9 @@ pub struct stat {
}
}
#[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};
}