aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-03-24 21:01:00 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-03-24 21:01:00 +0000
commit3ddbb8a977c1e7060088501b8fc5d07483774847 (patch)
tree93cafea773e541b0d1ffd779009946f4538c7e23
parent740b77b675fc26c64e5e305992a199585e703a2d (diff)
downloadgcc-3ddbb8a977c1e7060088501b8fc5d07483774847.zip
gcc-3ddbb8a977c1e7060088501b8fc5d07483774847.tar.gz
gcc-3ddbb8a977c1e7060088501b8fc5d07483774847.tar.bz2
gcc.c (cpp_options): Pass -MD through as -MD not -M -MF.
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: r51272
-rw-r--r--gcc/ChangeLog7
-rw-r--r--gcc/cppinit.c16
-rw-r--r--gcc/gcc.c4
3 files changed, 15 insertions, 12 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c8c100d..f8c4710 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -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-24 Andrew Cagney <ac131313@redhat.com>
* stmt.c (check_for_full_enumeration_handling): Remove tests of
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 0ea8298..8d4e0a7 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -1574,10 +1574,16 @@ cpp_handle_option (pfile, argc, argv, ignore)
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;
@@ -1591,12 +1597,6 @@ cpp_handle_option (pfile, argc, argv, ignore)
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;
@@ -1890,10 +1890,6 @@ init_dependency_output (pfile)
/* If -M or -MM was seen without -MF, 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;
}
/* Handle --help output. */
diff --git a/gcc/gcc.c b/gcc/gcc.c
index 436b97b..5787b0e 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -664,8 +664,8 @@ static const char *trad_capable_cpp =
static const char *cpp_unique_options =
"%{C:%{!E:%eGNU C does not support -C without using -E}}\
%{!Q:-quiet} %{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}\