Skip to content

Commit

Permalink
Add support for NetBSD/aarch64-be (big-endian arm64).
Browse files Browse the repository at this point in the history
  • Loading branch information
he32 committed May 7, 2023
1 parent 613a5c9 commit 6ef377c
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 0 deletions.
17 changes: 17 additions & 0 deletions compiler/rustc_target/src/spec/aarch64_be_unknown_netbsd.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
use crate::abi::Endian;
use crate::spec::{Target, TargetOptions};

pub fn target() -> Target {
Target {
llvm_target: "aarch64_be-unknown-netbsd".into(),
pointer_width: 64,
data_layout: "E-m:e-i8:8:32-i16:16:32-i64:64-i128:128-n32:64-S128".into(),
arch: "aarch64".into(),
options: TargetOptions {
mcount: "__mcount".into(),
max_atomic_width: Some(128),
endian: Endian::Big,
..super::netbsd_base::opts()
},
}
}
1 change: 1 addition & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1100,6 +1100,7 @@ supported_targets! {
("x86_64-unknown-openbsd", x86_64_unknown_openbsd),

("aarch64-unknown-netbsd", aarch64_unknown_netbsd),
("aarch64_be-unknown-netbsd", aarch64_be_unknown_netbsd),
("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),
("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
("i686-unknown-netbsd", i686_unknown_netbsd),
Expand Down
1 change: 1 addition & 0 deletions src/bootstrap/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ def default_build_triple(verbose):
cputype_mapper = {
'BePC': 'i686',
'aarch64': 'aarch64',
'aarch64eb': 'aarch64',
'amd64': 'x86_64',
'arm64': 'aarch64',
'i386': 'i686',
Expand Down

0 comments on commit 6ef377c

Please sign in to comment.