gcc says -MF is unrecognized when it isn't

Andreas Schwab schwab@suse.de
Sat Mar 9 11:21:00 GMT 2002


`-MF foo' is a valid switch, and it is processed correctly, but gcc says
that it is unrecognized.

2002-03-09  Andreas Schwab  <schwab@suse.de>

	* gcc.c (validate_all_switches): Also handle `%W{...}'.

--- gcc/gcc.c.~1.296.2.2.~	2002-03-04 14:01:50.000000000 +0100
+++ gcc/gcc.c	2002-03-09 20:10:08.000000000 +0100
@@ -6377,7 +6377,7 @@
     {
       p = comp->spec;
       while ((c = *p++))
-	if (c == '%' && *p == '{')
+	if (c == '%' && (*p == '{' || (*p == 'W' && *++p == '{')))
 	  /* We have a switch spec.  */
 	  validate_switches (p + 1);
     }
@@ -6387,14 +6387,14 @@
     {
       p = *(spec->ptr_spec);
       while ((c = *p++))
-	if (c == '%' && *p == '{')
+	if (c == '%' && (*p == '{' || (*p == 'W' && *++p == '{')))
 	  /* We have a switch spec.  */
 	  validate_switches (p + 1);
     }
 
   p = link_command_spec;
   while ((c = *p++))
-    if (c == '%' && *p == '{')
+    if (c == '%' && (*p == '{' || (*p == 'W' && *++p == '{')))
       /* We have a switch spec.  */
       validate_switches (p + 1);
 }

Andreas.

-- 
Andreas Schwab, SuSE Labs, schwab@suse.de
SuSE GmbH, Deutschherrnstr. 15-19, D-90429 Nürnberg
Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."



More information about the Gcc-patches mailing list