]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.
authorNeil Booth <neil@daikokuya.demon.co.uk>
Sun, 24 Mar 2002 13:13:01 +0000 (13:13 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Sun, 24 Mar 2002 13:13:01 +0000 (13:13 +0000)
preprocessor/3951
* gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.
* cppinit.c (cpp_handle_option): Set no_ouput if -MD or -MMD.
(init_dependency_output): Don't make no_output decision here.

From-SVN: r51259

gcc/ChangeLog
gcc/cppinit.c
gcc/gcc.c

index 0b7c3ef958e0e36fcf33f7b5d2a8888699897d1f..083d5e1ab015730ad541464cadcb491627409811 100644 (file)
@@ -1,3 +1,10 @@
+2002-03-24  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       preprocessor/3951
+       * gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.      
+       * cppinit.c (cpp_handle_option): Set no_ouput if -MD or -MMD.
+       (init_dependency_output): Don't make no_output decision here.
+
 2002-03-12  Bob Wilson  <bob.wilson@acm.org>
 
        * config/xtensa/t-xtensa (CRTSTUFF_T_CFLAGS_S): Define.
index 15962fb304eba9712b4e8adb229b08366214443c..90385248b9132275da90d397c5dcc9a084b47473 100644 (file)
@@ -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
index 5fc54bf23a04e267b04d7437bc10913f67d4a6c6..96cb8d617b8fd73c18f9d7e4cb785f27869709e7 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -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}\