mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-21 22:34:05 +00:00
sparc64-linux support
This commit is contained in:
parent
8aef058329
commit
728ec85e9a
1
mk/cfg/sparc64-unknown-linux-gnu.mk
Normal file
1
mk/cfg/sparc64-unknown-linux-gnu.mk
Normal file
@ -0,0 +1 @@
|
||||
# rustbuild-only target
|
@ -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
|
@ -157,6 +157,8 @@ supported_targets! {
|
||||
("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),
|
||||
|
30
src/librustc_back/target/sparc64_unknown_linux_gnu.rs
Normal file
30
src/librustc_back/target/sparc64_unknown_linux_gnu.rs
Normal 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,
|
||||
})
|
||||
}
|
@ -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};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user