Skip to content

Commit ec779b9

Browse files
committed
Add armv6-unknown-netbsd-eabihf target
1 parent 908230e commit ec779b9

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

src/bootstrap/native.rs

+1
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,7 @@ impl Step for Openssl {
596596
"arm-linux-androideabi" => "android",
597597
"arm-unknown-linux-gnueabi" => "linux-armv4",
598598
"arm-unknown-linux-gnueabihf" => "linux-armv4",
599+
"armv6-unknown-netbsd-eabihf" => "BSD-generic32",
599600
"armv7-linux-androideabi" => "android-armv7",
600601
"armv7-unknown-linux-gnueabihf" => "linux-armv4",
601602
"armv7-unknown-netbsd-eabihf" => "BSD-generic32",
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
// Copyright 2014 The Rust Project Developers. See the COPYRIGHT
2+
// file at the top-level directory of this distribution and at
3+
// http://rust-lang.org/COPYRIGHT.
4+
//
5+
// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
// option. This file may not be copied, modified, or distributed
9+
// except according to those terms.
10+
11+
use spec::{LinkerFlavor, Target, TargetOptions, TargetResult};
12+
13+
pub fn target() -> TargetResult {
14+
let mut base = super::netbsd_base::opts();
15+
base.max_atomic_width = Some(64);
16+
Ok(Target {
17+
llvm_target: "armv6-unknown-netbsdelf-eabihf".to_string(),
18+
target_endian: "little".to_string(),
19+
target_pointer_width: "32".to_string(),
20+
target_c_int_width: "32".to_string(),
21+
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
22+
arch: "arm".to_string(),
23+
target_os: "netbsd".to_string(),
24+
target_env: "eabihf".to_string(),
25+
target_vendor: "unknown".to_string(),
26+
linker_flavor: LinkerFlavor::Gcc,
27+
28+
options: TargetOptions {
29+
features: "+v6,+vfp2".to_string(),
30+
abi_blacklist: super::arm_base::abi_blacklist(),
31+
.. base
32+
}
33+
})
34+
}

src/librustc_target/spec/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,7 @@ supported_targets! {
317317
("i686-unknown-openbsd", i686_unknown_openbsd),
318318
("x86_64-unknown-openbsd", x86_64_unknown_openbsd),
319319

320+
("armv6-unknown-netbsd-eabihf", armv6_unknown_netbsd_eabihf),
320321
("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
321322
("i686-unknown-netbsd", i686_unknown_netbsd),
322323
("powerpc-unknown-netbsd", powerpc_unknown_netbsd),

0 commit comments

Comments
 (0)