This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH, GCC, RFC] Fix broken MinGW build


Hi,

Commit r251104 introduced uses of SIGKILL and SIGQUIT which broke MinGW
build due to those not being defined. This proposed patch check for the
macros availability.

ChangeLog entry is as follows:

*** gcc/ChangeLog ***

2017-08-23  Thomas Preud'homme  <thomas.preudhomme@arm.com>

	* gcc.c (execute): Only test for SIGKILL and SIGQUIT if available.

Is this an appropriate fix for the issue?

Best regards,

Thomas
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 96152dec87278f7f9491db4dbd2a03124547c42b..832a2e0c6caddac6aae526c0e8466d07b31725c8 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3154,8 +3154,13 @@ execute (void)
 	      switch (WTERMSIG (status))
 		{
 		case SIGINT:
+		/* SIGQUIT and SIGKILL are not available on MinGW.  */
+#ifdef SIGQUIT
 		case SIGQUIT:
+#endif
+#ifdef SIGKILL
 		case SIGKILL:
+#endif
 		case SIGTERM:
 		  /* The user (or environment) did something to the
 		     inferior.  Making this an ICE confuses the user

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]