From bc2ce02afa0ff6ed20b37315a6b529331cbefe13 Mon Sep 17 00:00:00 2001 From: Manuel Kalettka Date: Fri, 4 Nov 2022 14:28:15 +0100 Subject: [PATCH 1/3] remove not implemented signal references for l4re --- .../std/src/sys/unix/process/process_unix.rs | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 56a805cef7318..891792fd541cc 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -717,29 +717,48 @@ fn signal_string(signal: i32) -> &'static str { libc::SIGILL => " (SIGILL)", libc::SIGTRAP => " (SIGTRAP)", libc::SIGABRT => " (SIGABRT)", + #[cfg(not(target_os = "l4re"))] libc::SIGBUS => " (SIGBUS)", libc::SIGFPE => " (SIGFPE)", libc::SIGKILL => " (SIGKILL)", + #[cfg(not(target_os = "l4re"))] libc::SIGUSR1 => " (SIGUSR1)", libc::SIGSEGV => " (SIGSEGV)", + #[cfg(not(target_os = "l4re"))] libc::SIGUSR2 => " (SIGUSR2)", libc::SIGPIPE => " (SIGPIPE)", libc::SIGALRM => " (SIGALRM)", libc::SIGTERM => " (SIGTERM)", + #[cfg(not(target_os = "l4re"))] libc::SIGCHLD => " (SIGCHLD)", + #[cfg(not(target_os = "l4re"))] libc::SIGCONT => " (SIGCONT)", + #[cfg(not(target_os = "l4re"))] libc::SIGSTOP => " (SIGSTOP)", + #[cfg(not(target_os = "l4re"))] libc::SIGTSTP => " (SIGTSTP)", + #[cfg(not(target_os = "l4re"))] libc::SIGTTIN => " (SIGTTIN)", + #[cfg(not(target_os = "l4re"))] libc::SIGTTOU => " (SIGTTOU)", + #[cfg(not(target_os = "l4re"))] libc::SIGURG => " (SIGURG)", + #[cfg(not(target_os = "l4re"))] libc::SIGXCPU => " (SIGXCPU)", + #[cfg(not(target_os = "l4re"))] libc::SIGXFSZ => " (SIGXFSZ)", + #[cfg(not(target_os = "l4re"))] libc::SIGVTALRM => " (SIGVTALRM)", + #[cfg(not(target_os = "l4re"))] libc::SIGPROF => " (SIGPROF)", + #[cfg(not(target_os = "l4re"))] libc::SIGWINCH => " (SIGWINCH)", - #[cfg(not(target_os = "haiku"))] + #[cfg(not(any( + target_os = "haiku", + target_os = "l4re" + )))] libc::SIGIO => " (SIGIO)", + #[cfg(not(target_os = "l4re"))] libc::SIGSYS => " (SIGSYS)", // For information on Linux signals, run `man 7 signal` #[cfg(all( From 8dada935193726301c952e0d1c3be68f4f50ecf4 Mon Sep 17 00:00:00 2001 From: Manuel Kalettka Date: Fri, 4 Nov 2022 14:30:52 +0100 Subject: [PATCH 2/3] remove libunwind references for l4re --- library/std/src/personality/gcc.rs | 1 + 1 file changed, 1 insertion(+) diff --git a/library/std/src/personality/gcc.rs b/library/std/src/personality/gcc.rs index 7f0b0439cf083..2825bf1aeae62 100644 --- a/library/std/src/personality/gcc.rs +++ b/library/std/src/personality/gcc.rs @@ -35,6 +35,7 @@ //! //! Once stack has been unwound down to the handler frame level, unwinding stops //! and the last personality routine transfers control to the catch block. +#![cfg(not(target_os = "l4re"))] use super::dwarf::eh::{self, EHAction, EHContext}; use libc::{c_int, uintptr_t}; From 9a4a4f4422a40d12fde30d1c3198178d33688f94 Mon Sep 17 00:00:00 2001 From: Manuel Kalettka Date: Fri, 4 Nov 2022 15:19:56 +0100 Subject: [PATCH 3/3] fix format --- library/std/src/sys/unix/process/process_unix.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/library/std/src/sys/unix/process/process_unix.rs b/library/std/src/sys/unix/process/process_unix.rs index 891792fd541cc..bbc547111a0bf 100644 --- a/library/std/src/sys/unix/process/process_unix.rs +++ b/library/std/src/sys/unix/process/process_unix.rs @@ -753,10 +753,7 @@ fn signal_string(signal: i32) -> &'static str { libc::SIGPROF => " (SIGPROF)", #[cfg(not(target_os = "l4re"))] libc::SIGWINCH => " (SIGWINCH)", - #[cfg(not(any( - target_os = "haiku", - target_os = "l4re" - )))] + #[cfg(not(any(target_os = "haiku", target_os = "l4re")))] libc::SIGIO => " (SIGIO)", #[cfg(not(target_os = "l4re"))] libc::SIGSYS => " (SIGSYS)",