Auto merge of #105712 - amg98:feat/vita-support, r=wesleywiser
PlayStation Vita support Just the compiler definitions for no-std projects and std support using newlib Earlier PR: https://github.com/rust-lang/rust/pull/105606
This commit is contained in:
commit
fbe8292872
6 changed files with 172 additions and 1 deletions
|
@ -0,0 +1,40 @@
|
|||
use crate::abi::Endian;
|
||||
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
|
||||
|
||||
/// A base target for PlayStation Vita devices using the VITASDK toolchain (using newlib).
|
||||
///
|
||||
/// Requires the VITASDK toolchain on the host system.
|
||||
|
||||
pub fn target() -> Target {
|
||||
let pre_link_args = TargetOptions::link_args(LinkerFlavor::Gnu(Cc::Yes, Lld::No), &["-Wl,-q"]);
|
||||
|
||||
Target {
|
||||
llvm_target: "armv7a-vita-newlibeabihf".into(),
|
||||
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: "vita".into(),
|
||||
endian: Endian::Little,
|
||||
c_int_width: "32".into(),
|
||||
dynamic_linking: false,
|
||||
env: "newlib".into(),
|
||||
vendor: "sony".into(),
|
||||
abi: "eabihf".into(),
|
||||
linker_flavor: LinkerFlavor::Gnu(Cc::Yes, Lld::No),
|
||||
no_default_libraries: false,
|
||||
cpu: "cortex-a9".into(),
|
||||
executables: true,
|
||||
families: cvs!["unix"],
|
||||
linker: Some("arm-vita-eabi-gcc".into()),
|
||||
relocation_model: RelocModel::Static,
|
||||
features: "+v7,+neon".into(),
|
||||
pre_link_args,
|
||||
exe_suffix: ".elf".into(),
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
max_atomic_width: Some(32),
|
||||
..Default::default()
|
||||
},
|
||||
}
|
||||
}
|
|
@ -1241,6 +1241,8 @@ supported_targets! {
|
|||
|
||||
("aarch64-nintendo-switch-freestanding", aarch64_nintendo_switch_freestanding),
|
||||
|
||||
("armv7-sony-vita-newlibeabihf", armv7_sony_vita_newlibeabihf),
|
||||
|
||||
("armv7-unknown-linux-uclibceabi", armv7_unknown_linux_uclibceabi),
|
||||
("armv7-unknown-linux-uclibceabihf", armv7_unknown_linux_uclibceabihf),
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue