public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* preprocessor/6310: gcc -MF vs. depcomp
@ 2002-04-15  9:46 corsepiu
  0 siblings, 0 replies; 3+ messages in thread
From: corsepiu @ 2002-04-15  9:46 UTC (permalink / raw)
  To: gcc-gnats


>Number:         6310
>Category:       preprocessor
>Synopsis:       gcc -MF vs. depcomp
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 15 09:46:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Ralf Corsepius
>Release:        gcc-3.0.5 (20020410)
>Organization:
>Environment:
Linux i386/ELF
>Description:
automake > 1.4's depcomp uses
  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
to compute dependencies.

This basically causes it to invoke gcc this way:
gcc -g -O2 -c hello.c -MT hello.o -MD -MP -MF .deps/hello.TPo

Which now causes warning of this kind:
gcc: unrecognized option `-MF'

This has worked for gcc-3.0.x up to 3.0.4, but has stopped working with post-3.0.4 gcc's from the gcc-3.0-branch.

AFAI understand, probably this patch below is the origin of this problem:

2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>

	preprocessor/3951
	* gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.       
>How-To-Repeat:
Compile an arbitrary C-sources with gcc-3.0.5 from CVS/gcc-3-0-branch depcomp-style:

Eg.:
gcc -g -O2 -c hello.c -MT hello.o -MD -MP -MF deps/hello.TPo

gcc: unrecognized option `-MF'
>Fix:

>Release-Note:
>Audit-Trail:
>Unformatted:


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: preprocessor/6310: gcc -MF vs. depcomp
@ 2002-04-15 12:56 Neil Booth
  0 siblings, 0 replies; 3+ messages in thread
From: Neil Booth @ 2002-04-15 12:56 UTC (permalink / raw)
  To: nobody; +Cc: gcc-prs

The following reply was made to PR preprocessor/6310; it has been noted by GNATS.

From: Neil Booth <neil@daikokuya.demon.co.uk>
To: corsepiu@faw.uni-ulm.de
Cc: gcc-gnats@gcc.gnu.org, schwab@suse.de
Subject: Re: preprocessor/6310: gcc -MF vs. depcomp
Date: Mon, 15 Apr 2002 20:47:33 +0100

 corsepiu@faw.uni-ulm.de wrote:-
 
 > Which now causes warning of this kind:
 > gcc: unrecognized option `-MF'
 
 Thanks.  This was fixed recently by Andreas:
 
 2002-03-09  Andreas Schwab  <schwab@suse.de>
 
 	* gcc.c (validate_all_switches): Also handle `%W{...}'.
 
 but it wasn't put in 3.0 for some reason.  I've verified it fixes
 the problem, so I'll apply it now.  Patch follows.
 
 Neil.
 
 Index: gcc.c
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
 retrieving revision 1.205.2.27
 diff -u -p -r1.205.2.27 gcc.c
 --- gcc.c	24 Mar 2002 13:13:01 -0000	1.205.2.27
 +++ gcc.c	15 Apr 2002 19:45:39 -0000
 @@ -6208,7 +6208,7 @@ validate_all_switches ()
      {
        p = comp->spec;
        while ((c = *p++))
 -	if (c == '%' && *p == '{')
 +	if (c == '%' && (*p == '{' || (*p == 'W' && *++p == '{')))
  	  /* We have a switch spec.  */
  	  validate_switches (p + 1);
      }
 @@ -6218,14 +6218,14 @@ validate_all_switches ()
      {
        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);
  }


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: preprocessor/6310: gcc -MF vs. depcomp
@ 2002-04-15 12:52 neil
  0 siblings, 0 replies; 3+ messages in thread
From: neil @ 2002-04-15 12:52 UTC (permalink / raw)
  To: corsepiu, gcc-bugs, gcc-prs, nobody

Synopsis: gcc -MF vs. depcomp

State-Changed-From-To: open->closed
State-Changed-By: neil
State-Changed-When: Mon Apr 15 12:52:48 2002
State-Changed-Why:
    Applied Andreas' patch to 3.0 as well; it is already in
    3.1 and 3.2.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6310


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2002-04-15 19:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-15  9:46 preprocessor/6310: gcc -MF vs. depcomp corsepiu
2002-04-15 12:52 neil
2002-04-15 12:56 Neil Booth

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).