add nto80 x86-64 and aarch64 target
Signed-off-by: Florian Bartels <Florian.Bartels@elektrobit.com>
This commit is contained in:
parent
62661f2592
commit
3f045c9d2e
9 changed files with 39 additions and 14 deletions
|
@ -1964,8 +1964,10 @@ supported_targets! {
|
|||
("aarch64-unknown-nto-qnx700", aarch64_unknown_nto_qnx700),
|
||||
("aarch64-unknown-nto-qnx710", aarch64_unknown_nto_qnx710),
|
||||
("aarch64-unknown-nto-qnx710_iosock", aarch64_unknown_nto_qnx710_iosock),
|
||||
("aarch64-unknown-nto-qnx800", aarch64_unknown_nto_qnx800),
|
||||
("x86_64-pc-nto-qnx710", x86_64_pc_nto_qnx710),
|
||||
("x86_64-pc-nto-qnx710_iosock", x86_64_pc_nto_qnx710_iosock),
|
||||
("x86_64-pc-nto-qnx800", x86_64_pc_nto_qnx800),
|
||||
("i586-pc-nto-qnx700", i586_pc_nto_qnx700),
|
||||
|
||||
("aarch64-unknown-linux-ohos", aarch64_unknown_linux_ohos),
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
use crate::spec::Target;
|
||||
use crate::spec::base::nto_qnx;
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut target = nto_qnx::aarch64();
|
||||
target.metadata.description = Some("ARM64 QNX Neutrino 8.0 RTOS".into());
|
||||
target.options.pre_link_args =
|
||||
nto_qnx::pre_link_args(nto_qnx::ApiVariant::Default, nto_qnx::Arch::Aarch64);
|
||||
target.options.env = "nto80".into();
|
||||
target
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
use crate::spec::Target;
|
||||
use crate::spec::base::nto_qnx;
|
||||
|
||||
pub(crate) fn target() -> Target {
|
||||
let mut target = nto_qnx::x86_64();
|
||||
target.metadata.description = Some("x86 64-bit QNX Neutrino 8.0 RTOS".into());
|
||||
target.options.pre_link_args =
|
||||
nto_qnx::pre_link_args(nto_qnx::ApiVariant::Default, nto_qnx::Arch::X86_64);
|
||||
target.options.env = "nto80".into();
|
||||
target
|
||||
}
|
|
@ -139,8 +139,8 @@ test = true
|
|||
level = "warn"
|
||||
check-cfg = [
|
||||
'cfg(bootstrap)',
|
||||
'cfg(target_arch, values("xtensa", "aarch64-unknown-nto-qnx710_iosock", "x86_64-pc-nto-qnx710_iosock"))',
|
||||
'cfg(target_env, values("nto71_iosock"))',
|
||||
'cfg(target_arch, values("xtensa", "aarch64-unknown-nto-qnx710_iosock", "x86_64-pc-nto-qnx710_iosock", "x86_64-pc-nto-qnx800","aarch64-unknown-nto-qnx800"))',
|
||||
'cfg(target_env, values("nto71_iosock", "nto80"))',
|
||||
# std use #[path] imports to portable-simd `std_float` crate
|
||||
# and to the `backtrace` crate which messes-up with Cargo list
|
||||
# of declared features, we therefor expect any feature cfg
|
||||
|
|
|
@ -19,8 +19,7 @@ use crate::sys::process::process_common::*;
|
|||
use crate::{fmt, mem, sys};
|
||||
|
||||
cfg_if::cfg_if! {
|
||||
// This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
|
||||
if #[cfg(any(target_env = "nto70", target_env = "nto71", target_env = "nto71_iosock"))] {
|
||||
if #[cfg(target_os = "nto")] {
|
||||
use crate::thread;
|
||||
use libc::{c_char, posix_spawn_file_actions_t, posix_spawnattr_t};
|
||||
use crate::time::Duration;
|
||||
|
@ -187,13 +186,7 @@ impl Command {
|
|||
|
||||
// Attempts to fork the process. If successful, returns Ok((0, -1))
|
||||
// in the child, and Ok((child_pid, -1)) in the parent.
|
||||
#[cfg(not(any(
|
||||
target_os = "watchos",
|
||||
target_os = "tvos",
|
||||
target_env = "nto70",
|
||||
target_env = "nto71",
|
||||
target_env = "nto71_iosock",
|
||||
)))]
|
||||
#[cfg(not(any(target_os = "watchos", target_os = "tvos", target_os = "nto")))]
|
||||
unsafe fn do_fork(&mut self) -> Result<pid_t, io::Error> {
|
||||
cvt(libc::fork())
|
||||
}
|
||||
|
@ -202,8 +195,7 @@ impl Command {
|
|||
// or closed a file descriptor while the fork() was occurring".
|
||||
// Documentation says "... or try calling fork() again". This is what we do here.
|
||||
// See also https://www.qnx.com/developers/docs/7.1/#com.qnx.doc.neutrino.lib_ref/topic/f/fork.html
|
||||
// This workaround is only needed for QNX 7.0 and 7.1. The bug should have been fixed in 8.0
|
||||
#[cfg(any(target_env = "nto70", target_env = "nto71", target_env = "nto71_iosock"))]
|
||||
#[cfg(target_os = "nto")]
|
||||
unsafe fn do_fork(&mut self) -> Result<pid_t, io::Error> {
|
||||
use crate::sys::os::errno;
|
||||
|
||||
|
|
|
@ -36,6 +36,8 @@ const STAGE0_MISSING_TARGETS: &[&str] = &[
|
|||
// just a dummy comment so the list doesn't get onelined
|
||||
"aarch64-unknown-nto-qnx710_iosock",
|
||||
"x86_64-pc-nto-qnx710_iosock",
|
||||
"x86_64-pc-nto-qnx800",
|
||||
"aarch64-unknown-nto-qnx800",
|
||||
];
|
||||
|
||||
/// Minimum version threshold for libstdc++ required when using prebuilt LLVM
|
||||
|
|
|
@ -115,6 +115,7 @@ For conditional compilation, following QNX Neutrino specific attributes are defi
|
|||
- `target_env` = `"nto71"` (for QNX Neutrino 7.1 with "classic" network stack "io_pkt")
|
||||
- `target_env` = `"nto71_iosock"` (for QNX Neutrino 7.1 with network stack "io_sock")
|
||||
- `target_env` = `"nto70"` (for QNX Neutrino 7.0)
|
||||
- `target_env` = `"nto80"` (for QNX Neutrino 8.0)
|
||||
|
||||
## Building the target
|
||||
|
||||
|
|
|
@ -60,6 +60,9 @@
|
|||
//@ revisions: aarch64_unknown_nto_qnx710_iosock
|
||||
//@ [aarch64_unknown_nto_qnx710_iosock] compile-flags: --target aarch64-unknown-nto-qnx710_iosock
|
||||
//@ [aarch64_unknown_nto_qnx710_iosock] needs-llvm-components: aarch64
|
||||
//@ revisions: aarch64_unknown_nto_qnx800
|
||||
//@ [aarch64_unknown_nto_qnx800] compile-flags: --target aarch64-unknown-nto-qnx800
|
||||
//@ [aarch64_unknown_nto_qnx800] needs-llvm-components: aarch64
|
||||
//@ revisions: aarch64_unknown_openbsd
|
||||
//@ [aarch64_unknown_openbsd] compile-flags: --target aarch64-unknown-openbsd
|
||||
//@ [aarch64_unknown_openbsd] needs-llvm-components: aarch64
|
||||
|
@ -570,6 +573,9 @@
|
|||
//@ revisions: x86_64_pc_nto_qnx710_iosock
|
||||
//@ [x86_64_pc_nto_qnx710_iosock] compile-flags: --target x86_64-pc-nto-qnx710_iosock
|
||||
//@ [x86_64_pc_nto_qnx710_iosock] needs-llvm-components: x86
|
||||
//@ revisions: x86_64_pc_nto_qnx800
|
||||
//@ [x86_64_pc_nto_qnx800] compile-flags: --target x86_64-pc-nto-qnx800
|
||||
//@ [x86_64_pc_nto_qnx800] needs-llvm-components: x86
|
||||
//@ revisions: x86_64_pc_solaris
|
||||
//@ [x86_64_pc_solaris] compile-flags: --target x86_64-pc-solaris
|
||||
//@ [x86_64_pc_solaris] needs-llvm-components: x86
|
||||
|
|
|
@ -156,7 +156,7 @@ warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
|||
LL | target_env = "_UNEXPECTED_VALUE",
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
|
|
||||
= note: expected values for `target_env` are: ``, `gnu`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `nto71_iosock`, `ohos`, `p1`, `p2`, `relibc`, `sgx`, and `uclibc`
|
||||
= note: expected values for `target_env` are: ``, `gnu`, `msvc`, `musl`, `newlib`, `nto70`, `nto71`, `nto71_iosock`, `nto80`, `ohos`, `p1`, `p2`, `relibc`, `sgx`, and `uclibc`
|
||||
= note: see <https://doc.rust-lang.org/nightly/rustc/check-cfg.html> for more information about checking conditional configuration
|
||||
|
||||
warning: unexpected `cfg` condition value: `_UNEXPECTED_VALUE`
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue