Add support for NetBSD/aarch64-be (big-endian arm64).

This commit is contained in:
Havard Eidnes 2023-05-07 18:35:35 +00:00
parent 613a5c95ae
commit 6ef377cc41
3 changed files with 19 additions and 0 deletions

View File

@ -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()
},
}
}

View File

@ -1100,6 +1100,7 @@ fn $module() {
("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),

View File

@ -327,6 +327,7 @@ def default_build_triple(verbose):
cputype_mapper = {
'BePC': 'i686',
'aarch64': 'aarch64',
'aarch64eb': 'aarch64',
'amd64': 'x86_64',
'arm64': 'aarch64',
'i386': 'i686',