Skip to content

Commit

Permalink
add nto80 x86-64 and aarch64 target
Browse files Browse the repository at this point in the history
Signed-off-by: Florian Bartels <Florian.Bartels@elektrobit.com>
  • Loading branch information
AkhilTThomas authored and gitbot committed Feb 20, 2025
1 parent 1f5f5a6 commit 2d4d2cd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
4 changes: 2 additions & 2 deletions std/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 3 additions & 11 deletions std/src/sys/pal/unix/process/process_unix.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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())
}
Expand All @@ -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;

Expand Down

0 comments on commit 2d4d2cd

Please sign in to comment.