summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHomu <homu@barosl.com>2016-09-19 09:00:38 +0900
committerHomu <homu@barosl.com>2016-09-19 09:00:38 +0900
commit1b4656f49172f65e2af2291ecee8c72b0e92bc17 (patch)
tree4e15895cf2b9878da6bd69bebe211756ae809b86
parent9f3f7c21890e93bf3a6907c8e5f8dbd12d0f253b (diff)
parent1f2d896b9692f138e4c0cfa116deb4d34ab893ea (diff)
downloadnix-1b4656f49172f65e2af2291ecee8c72b0e92bc17.zip
Auto merge of #430 - tessel:master, r=posborne
Removes SIGSTKFLT when cross-compiling to MIPS. This is the only failing error when cross compiling to Tessel, which is a MIPS-based architecture. Apparently libc does not have SIGSTKFLT (Term Stack fault on coprocessor) on this system, and indeed it does not have a coprocessor. This commit should preserve the semantics for all other architectures. Potentially this can be inverted in the future if more platforms are added to only *whitelist* ARM, x86, x86_64, but I thought this conditional would suffice.
-rw-r--r--src/sys/signal.rs36
1 files changed, 34 insertions, 2 deletions
diff --git a/src/sys/signal.rs b/src/sys/signal.rs
index 18827332..bdc25b47 100644
--- a/src/sys/signal.rs
+++ b/src/sys/signal.rs
@@ -28,7 +28,7 @@ pub enum Signal {
SIGPIPE = libc::SIGPIPE,
SIGALRM = libc::SIGALRM,
SIGTERM = libc::SIGTERM,
- #[cfg(any(target_os = "linux", target_os = "android", target_os = "emscripten"))]
+ #[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(target_arch = "mips")))]
SIGSTKFLT = libc::SIGSTKFLT,
SIGCHLD = libc::SIGCHLD,
SIGCONT = libc::SIGCONT,
@@ -54,7 +54,7 @@ pub enum Signal {
pub use self::Signal::*;
-#[cfg(any(target_os = "linux", target_os = "android", target_os = "emscripten"))]
+#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), not(target_arch = "mips")))]
const SIGNALS: [Signal; 31] = [
SIGHUP,
SIGINT,
@@ -87,6 +87,38 @@ const SIGNALS: [Signal; 31] = [
SIGIO,
SIGPWR,
SIGSYS];
+#[cfg(all(any(target_os = "linux", target_os = "android", target_os = "emscripten"), target_arch = "mips"))]
+const SIGNALS: [Signal; 30] = [
+ SIGHUP,
+ SIGINT,
+ SIGQUIT,
+ SIGILL,
+ SIGTRAP,
+ SIGABRT,
+ SIGBUS,
+ SIGFPE,
+ SIGKILL,
+ SIGUSR1,
+ SIGSEGV,
+ SIGUSR2,
+ SIGPIPE,
+ SIGALRM,
+ SIGTERM,
+ SIGCHLD,
+ SIGCONT,
+ SIGSTOP,
+ SIGTSTP,
+ SIGTTIN,
+ SIGTTOU,
+ SIGURG,
+ SIGXCPU,
+ SIGXFSZ,
+ SIGVTALRM,
+ SIGPROF,
+ SIGWINCH,
+ SIGIO,
+ SIGPWR,
+ SIGSYS];
#[cfg(not(any(target_os = "linux", target_os = "android", target_os = "emscripten")))]
const SIGNALS: [Signal; 31] = [
SIGHUP,