Skip to content

Commit

Permalink
rtems: Add spec file for arm_rtems6_eabihf
Browse files Browse the repository at this point in the history
  • Loading branch information
thesummer committed Sep 3, 2024
1 parent 6f435cb commit 124454c
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
2 changes: 2 additions & 0 deletions compiler/rustc_target/src/spec/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1695,6 +1695,8 @@ supported_targets! {
("armv7r-none-eabihf", armv7r_none_eabihf),
("armv8r-none-eabihf", armv8r_none_eabihf),

("armv7-rtems-eabihf", armv7_rtems_eabihf),

("x86_64-pc-solaris", x86_64_pc_solaris),
("sparcv9-sun-solaris", sparcv9_sun_solaris),

Expand Down
35 changes: 35 additions & 0 deletions compiler/rustc_target/src/spec/targets/armv7_rtems_eabihf.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};

pub(crate) fn target() -> Target {
Target {
llvm_target: "armv7-unknown-none-eabihf".into(),
metadata: crate::spec::TargetMetadata {
description: Some("Armv7 RTEMS (Requires RTEMS toolchain and kernel".into()),
tier: Some(3),
host_tools: Some(false),
std: Some(true),
},
pointer_width: 32,
data_layout: "e-m:e-p:32:32-Fi8-i64:64-v128:64:128-a:0:32-n32-S64".into(),
arch: "arm".into(),

options: TargetOptions {
os: "rtems".into(),
families: cvs!["unix"],
abi: "eabihf".into(),
linker_flavor: LinkerFlavor::Gnu(Cc::Yes, Lld::No),
linker: None,
relocation_model: RelocModel::Static,
panic_strategy: PanicStrategy::Abort,
features: "+thumb2,+neon,+vfp3".into(),
max_atomic_width: Some(64),
emit_debug_gdb_scripts: false,
// GCC defaults to 8 for arm-none here.
c_enum_min_bits: Some(8),
eh_frame_header: false,
no_default_libraries: false,
env: "newlib".into(),
..Default::default()
},
}
}
3 changes: 3 additions & 0 deletions tests/assembly/targets/targets-elf.rs
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,9 @@
//@ revisions: armv7_linux_androideabi
//@ [armv7_linux_androideabi] compile-flags: --target armv7-linux-androideabi
//@ [armv7_linux_androideabi] needs-llvm-components: arm
//@ revisions: armv7_rtems_eabihf
//@ [armv7_rtems_eabihf] compile-flags: --target armv7-rtems-eabihf
//@ [armv7_rtems_eabihf] needs-llvm-components: arm
//@ revisions: armv7_sony_vita_newlibeabihf
//@ [armv7_sony_vita_newlibeabihf] compile-flags: --target armv7-sony-vita-newlibeabihf
//@ [armv7_sony_vita_newlibeabihf] needs-llvm-components: arm
Expand Down

0 comments on commit 124454c

Please sign in to comment.