public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
@ 2002-03-23 15:46 Neil Booth
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Booth @ 2002-03-23 15:46 UTC (permalink / raw)
  To: neil; +Cc: gcc-prs

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

From: Neil Booth <neil@daikokuya.demon.co.uk>
To: cgd@broadcom.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
Date: Sat, 23 Mar 2002 23:37:44 +0000

 Chris G. Demetriou wrote:-
 
 > I just tested it with the code that tripped over the -MMD problem, and
 > it seems to work fine.  I've also tested it with a bunch of additional
 > code / makefiles, and i noticed nothing additional wrong.
 > dependencies get built right AFAICT, etc.
 > 
 > I can't easily go back and test it on the original problem case, but I
 > don't think that's likely to break again since you now know about it.
 > (You'll recall that doing that ... involved some difficulty and
 > time...  if you'd like I can get the ball rolling on that again.  8-)
 
 I think we're there now.  Thanks for your help.
 
 Neil.


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

* Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
@ 2002-03-23 15:36 cgd
  0 siblings, 0 replies; 6+ messages in thread
From: cgd @ 2002-03-23 15:36 UTC (permalink / raw)
  To: neil; +Cc: gcc-prs

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

From: cgd@broadcom.com
To: "Neil Booth" <neil@daikokuya.demon.co.uk>
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/3951: need for -MF w/ -M breaks backward
 compat. w/ documented features.
Date: 23 Mar 2002 15:26:26 -0800

 At Sat, 23 Mar 2002 13:16:56 +0000, Neil Booth wrote:
 > The final patch I sent you seems to be the holy grail.  It gets the
 > above right, fixes the 2.95 issues we wanted to avoid, and handles -MF,
 > -MQ and -MT like we want.  For the benefit of GNATS, I'll reproduce the
 > patch below.  If you could confirm this fixes this issue once and for
 > all, I'll apply it to all 3 trees.
 
 I just tested it with the code that tripped over the -MMD problem, and
 it seems to work fine.  I've also tested it with a bunch of additional
 code / makefiles, and i noticed nothing additional wrong.
 dependencies get built right AFAICT, etc.
 
 I can't easily go back and test it on the original problem case, but I
 don't think that's likely to break again since you now know about it.
 (You'll recall that doing that ... involved some difficulty and
 time...  if you'd like I can get the ball rolling on that again.  8-)
 
 
 chris
 


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

* Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
@ 2002-03-23  5:26 Neil Booth
  0 siblings, 0 replies; 6+ messages in thread
From: Neil Booth @ 2002-03-23  5:26 UTC (permalink / raw)
  To: neil; +Cc: gcc-prs

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

From: Neil Booth <neil@daikokuya.demon.co.uk>
To: cgd@broadcom.com
Cc: gcc-gnats@gcc.gnu.org
Subject: Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
Date: Sat, 23 Mar 2002 13:16:56 +0000

 I've cc-ed GNATS.
 
 Chris G. Demetriou wrote:-
 
 > On further testing, not sure that all is happy in 3.0.x with the
 > matches that you made.  (I didn't cc the list/gnats on this, but if
 > you'd like feel free to fwd this msg there.)
 > 
 > 
 > It could be that i've goofed them up applying them to my source tree,
 > but I don't _think_ I did.
 > 
 > 
 > For a file foo.c and foo.S with 'junk' contents, what does:
 > 
 > 	gcc -MMD -c -o foo.o $@
 > 
 > produce for you?
 > 
 > similarly, what if you say "-E" instead of -c?
 > 
 > 
 > in my little world, for the .c / -c case, things are fine.
 > 
 > for the .c / -E, .S / -c, and .S / -E cases, the the preprocessed
 > output is zero-length (leading to ... not the right thing in the .S /
 > -c case, especially 8-).
 
 Wah! It works now! And with -save-temps!!  Happy!!!  I've done
 everything I can think of to break it, and compared everything with
 2.95.4; and it's all matching.
 
 The final patch I sent you seems to be the holy grail.  It gets the
 above right, fixes the 2.95 issues we wanted to avoid, and handles -MF,
 -MQ and -MT like we want.  For the benefit of GNATS, I'll reproduce the
 patch below.  If you could confirm this fixes this issue once and for
 all, I'll apply it to all 3 trees.
 
 Thanks for persevering!
 
 Neil.
 
 Index: gcc.c
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/gcc.c,v
 retrieving revision 1.205.2.26
 diff -u -p -r1.205.2.26 gcc.c
 --- gcc.c	2002/03/11 21:38:14	1.205.2.26
 +++ gcc.c	2002/03/23 12:07:37
 @@ -596,8 +596,8 @@ static const char *cpp_options =
  "%{C:%{!E:%eGNU C does not support -C without using -E}}\
   %{std*} %{nostdinc*}\
   %{C} %{v} %{I*} %{P} %{$} %I\
 - %{MD:-M -MF %W{!o: %b.d}%W{o*:%.d%*}}\
 - %{MMD:-MM -MF %W{!o: %b.d}%W{o*:%.d%*}}\
 + %{MD:-MD %W{!o: %b.d}%W{o*:%.d%*}}\
 + %{MMD:-MMD %W{!o: %b.d}%W{o*:%.d%*}}\
   %{M} %{MM} %W{MF*} %{MG} %{MP} %{MQ*} %{MT*}\
   %{!E:%{!M:%{!MM:%{MD|MMD:%{o*:-MQ %*}}}}}\
   %{!no-gcc:-D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 -D__GNUC_PATCHLEVEL__=%v3}\
 Index: cppinit.c
 ===================================================================
 RCS file: /cvs/gcc/gcc/gcc/cppinit.c,v
 retrieving revision 1.147.2.12
 diff -u -p -r1.147.2.12 cppinit.c
 --- cppinit.c	2002/03/11 21:38:18	1.147.2.12
 +++ cppinit.c	2002/03/23 12:07:41
 @@ -1459,10 +1459,16 @@ cpp_handle_option (pfile, argc, argv)
  	  CPP_OPTION (pfile, print_deps_missing_files) = 1;
  	  break;
  	case OPT_M:
 +	  /* When doing dependencies with -M or -MM, suppress normal
 +	     preprocessed output, but still do -dM etc. as software
 +	     depends on this.  Preprocessed output occurs if -MD, -MMD
 +	     or environment var dependency generation is used.  */
  	  CPP_OPTION (pfile, print_deps) = 2;
 +	  CPP_OPTION (pfile, no_output) = 1;
  	  break;
  	case OPT_MM:
  	  CPP_OPTION (pfile, print_deps) = 1;
 +	  CPP_OPTION (pfile, no_output) = 1;
  	  break;
  	case OPT_MF:
  	  CPP_OPTION (pfile, deps_file) = arg;
 @@ -1476,12 +1482,6 @@ cpp_handle_option (pfile, argc, argv)
  	  deps_add_target (pfile->deps, arg, opt_code == OPT_MQ);
  	  break;
  
 -	  /* -MD and -MMD for cpp0 are deprecated and undocumented
 -	     (use -M or -MM with -MF instead), and probably should be
 -	     removed with the next major GCC version.  For the moment
 -	     we allow these for the benefit of Automake 1.4, which
 -	     uses these when dependency tracking is enabled.  Automake
 -	     1.5 will fix this.  */
  	case OPT_MD:
  	  CPP_OPTION (pfile, print_deps) = 2;
  	  CPP_OPTION (pfile, deps_file) = arg;
 @@ -1786,10 +1786,6 @@ init_dependency_output (pfile)
      /* If -M or -MM was seen, default output to wherever was specified
         with -o.  out_fname is non-NULL here.  */
      CPP_OPTION (pfile, deps_file) = CPP_OPTION (pfile, out_fname);
 -
 -  /* When doing dependencies, suppress normal preprocessed output.
 -     Still do -dM, -dI etc. as e.g. glibc depends on this.  */
 -  CPP_OPTION (pfile, no_output) = 1;
  }
  
  static void


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

* Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
@ 2002-03-11 13:37 neil
  0 siblings, 0 replies; 6+ messages in thread
From: neil @ 2002-03-11 13:37 UTC (permalink / raw)
  To: cgd, gcc-bugs, gcc-prs, neil

Synopsis: need for -MF w/ -M breaks backward compat. w/ documented features.

State-Changed-From-To: feedback->closed
State-Changed-By: neil
State-Changed-When: Mon Mar 11 13:37:31 2002
State-Changed-Why:
    Bug confirmed fixed by submitter.  Committed to 3.0.5, 3.1 and 3.2.  Thanks!

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


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

* Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
@ 2002-02-19 23:46 neil
  0 siblings, 0 replies; 6+ messages in thread
From: neil @ 2002-02-19 23:46 UTC (permalink / raw)
  To: cgd, gcc-bugs, gcc-prs, neil

Synopsis: need for -MF w/ -M breaks backward compat. w/ documented features.

State-Changed-From-To: analyzed->feedback
State-Changed-By: neil
State-Changed-When: Tue Feb 19 23:25:28 2002
State-Changed-Why:
    http://gcc.gnu.org/ml/gcc-cvs/2002-02/msg00491.html
    
    which is applied to the 3.1 branch should solve this.

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


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

* Re: preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features.
@ 2002-02-19  0:58 neil
  0 siblings, 0 replies; 6+ messages in thread
From: neil @ 2002-02-19  0:58 UTC (permalink / raw)
  To: cgd, gcc-bugs, gcc-prs, neil, nobody

Synopsis: need for -MF w/ -M breaks backward compat. w/ documented features.

Responsible-Changed-From-To: unassigned->neil
Responsible-Changed-By: neil
Responsible-Changed-When: Tue Feb 19 00:58:37 2002
Responsible-Changed-Why:
    I'm the mug who is going to try and fix this.
    
    I just fixed a change in meaning from 2.95 of -o with -MD -E; it used to indicate the preprocessed output file, but 3.0 and CVS were taking it to indicate the object file.
    
    With a few more refinements, I think we can bang this on the head too.  There is plenty of time for 3.1; and I hope we can get it in 3.0.5 too if that exists.  Stay tuned 8^)
State-Changed-From-To: open->analyzed
State-Changed-By: neil
State-Changed-When: Tue Feb 19 00:58:37 2002
State-Changed-Why:
    Confirmed.  Woo... what fun.

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


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

end of thread, other threads:[~2002-03-23 23:46 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-23 15:46 preprocessor/3951: need for -MF w/ -M breaks backward compat. w/ documented features Neil Booth
  -- strict thread matches above, loose matches on Subject: below --
2002-03-23 15:36 cgd
2002-03-23  5:26 Neil Booth
2002-03-11 13:37 neil
2002-02-19 23:46 neil
2002-02-19  0:58 neil

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).