Auto merge of #111819 - nikarh:vita-improved, r=Amanieu
Improved std support for ps vita target Fixed a couple of things in std support for ps vita via Vita SDK newlib oss implementation: - Added missing hardware features to target spec - Compile in thumb by default (newlib is also compiled in thumb) - Fixed fs calls. Vita newlib has a not-very-posix dirent. Also vita does not expose inodes, it's stubbed as 0 in stat, and I'm stubbing it here for dirent (because vita newlibs's dirent doesn't even have that field) - Enabled signal handlers for panic unwinding - Dropped static link requirement from the platform support md. Also, rearranged sections to better stick with the template.
This commit is contained in:
commit
b3dd578767
10 changed files with 81 additions and 88 deletions
|
@ -1,15 +1,18 @@
|
|||
use crate::abi::Endian;
|
||||
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, PanicStrategy, RelocModel, Target, TargetOptions};
|
||||
use crate::spec::{cvs, Cc, LinkerFlavor, Lld, 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"]);
|
||||
let pre_link_args = TargetOptions::link_args(
|
||||
LinkerFlavor::Gnu(Cc::Yes, Lld::No),
|
||||
&["-Wl,-q", "-Wl,--pic-veneer"],
|
||||
);
|
||||
|
||||
Target {
|
||||
llvm_target: "armv7a-vita-eabihf".into(),
|
||||
llvm_target: "thumbv7a-vita-eabihf".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(),
|
||||
|
@ -18,21 +21,19 @@ pub fn target() -> Target {
|
|||
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(),
|
||||
features: "+v7,+neon,+vfp3,+thumb2,+thumb-mode".into(),
|
||||
pre_link_args,
|
||||
exe_suffix: ".elf".into(),
|
||||
panic_strategy: PanicStrategy::Abort,
|
||||
has_thumb_interworking: true,
|
||||
max_atomic_width: Some(64),
|
||||
..Default::default()
|
||||
},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue