Add support for NetBSD/riscv64 aka. riscv64gc-unknown-netbsd.
This commit is contained in:
parent
6dab6dc5fc
commit
6cc37bbee0
6 changed files with 32 additions and 2 deletions
|
@ -1325,6 +1325,7 @@ supported_targets! {
|
|||
("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
|
||||
("i686-unknown-netbsd", i686_unknown_netbsd),
|
||||
("powerpc-unknown-netbsd", powerpc_unknown_netbsd),
|
||||
("riscv64gc-unknown-netbsd", riscv64gc_unknown_netbsd),
|
||||
("sparc64-unknown-netbsd", sparc64_unknown_netbsd),
|
||||
("x86_64-unknown-netbsd", x86_64_unknown_netbsd),
|
||||
|
||||
|
|
19
compiler/rustc_target/src/spec/riscv64gc_unknown_netbsd.rs
Normal file
19
compiler/rustc_target/src/spec/riscv64gc_unknown_netbsd.rs
Normal file
|
@ -0,0 +1,19 @@
|
|||
use crate::spec::{CodeModel, Target, TargetOptions};
|
||||
|
||||
pub fn target() -> Target {
|
||||
Target {
|
||||
llvm_target: "riscv64-unknown-netbsd".into(),
|
||||
pointer_width: 64,
|
||||
data_layout: "e-m:e-p:64:64-i64:64-i128:128-n32:64-S128".into(),
|
||||
arch: "riscv64".into(),
|
||||
options: TargetOptions {
|
||||
code_model: Some(CodeModel::Medium),
|
||||
cpu: "generic-rv64".into(),
|
||||
features: "+m,+a,+f,+d,+c".into(),
|
||||
llvm_abiname: "lp64d".into(),
|
||||
max_atomic_width: Some(64),
|
||||
mcount: "__mcount".into(),
|
||||
..super::netbsd_base::opts()
|
||||
},
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue