Skip to content

Commit 908230e

Browse files
committed
Add armv7-unknown-netbsd-eabihf target
1 parent 32f9b53 commit 908230e

File tree

3 files changed

+37
-0
lines changed

3 files changed

+37
-0
lines changed

src/bootstrap/native.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -598,6 +598,7 @@ impl Step for Openssl {
598598
"arm-unknown-linux-gnueabihf" => "linux-armv4",
599599
"armv7-linux-androideabi" => "android-armv7",
600600
"armv7-unknown-linux-gnueabihf" => "linux-armv4",
601+
"armv7-unknown-netbsd-eabihf" => "BSD-generic32",
601602
"i586-unknown-linux-gnu" => "linux-elf",
602603
"i586-unknown-linux-musl" => "linux-elf",
603604
"i686-apple-darwin" => "darwin-i386-cc",
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
// Copyright 2016 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 base = super::netbsd_base::opts();
15+
Ok(Target {
16+
llvm_target: "armv7-unknown-netbsdelf-eabihf".to_string(),
17+
target_endian: "little".to_string(),
18+
target_pointer_width: "32".to_string(),
19+
target_c_int_width: "32".to_string(),
20+
data_layout: "e-m:e-p:32:32-i64:64-v128:64:128-a:0:32-n32-S64".to_string(),
21+
arch: "arm".to_string(),
22+
target_os: "netbsd".to_string(),
23+
target_env: "eabihf".to_string(),
24+
target_vendor: "unknown".to_string(),
25+
linker_flavor: LinkerFlavor::Gcc,
26+
27+
options: TargetOptions {
28+
features: "+v7,+vfp3,+d16,+thumb2,-neon".to_string(),
29+
cpu: "generic".to_string(),
30+
max_atomic_width: Some(64),
31+
abi_blacklist: super::arm_base::abi_blacklist(),
32+
.. base
33+
}
34+
})
35+
}

src/librustc_target/spec/mod.rs

Lines changed: 1 addition & 0 deletions
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+
("armv7-unknown-netbsd-eabihf", armv7_unknown_netbsd_eabihf),
320321
("i686-unknown-netbsd", i686_unknown_netbsd),
321322
("powerpc-unknown-netbsd", powerpc_unknown_netbsd),
322323
("sparc64-unknown-netbsd", sparc64_unknown_netbsd),

0 commit comments

Comments
 (0)