diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 5882f22fc33..098f7f2db6b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2002-05-31 Matthew Woodcraft + + * gcc.c (cpp_unique_options): Remove "-d" options. + (cpp_debug_options): New spec string. + (default_compilers): Use it. + * objc/lang-specs.h: Likewise. + 2002-05-31 Nathanael Nerode * gcc/Makefile.in: Replace HOST_PREFIX, HOST_PREFIX_1 with diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index e19c55abc78..75e7599869a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,7 @@ +2002-05-31 Matthew Woodcraft + + * lang-specs.h: Use cpp_debug_options. + 2002-05-28 Zack Weinberg * mangle.c, tree.c: Include real.h. diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h index 04050063ba2..8d220eefab6 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h @@ -39,7 +39,8 @@ Boston, MA 02111-1307, USA. */ %{!Wno-deprecated:-D__DEPRECATED}\ %{!fno-exceptions:-D__EXCEPTIONS}\ -D__GXX_ABI_VERSION=100\ - %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\ + %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)\ + %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ %{save-temps:cc1plus -E \ %{!no-gcc:-D__GNUG__=%v1}\ diff --git a/gcc/f/ChangeLog b/gcc/f/ChangeLog index 03c1b67b322..005b151bbdc 100644 --- a/gcc/f/ChangeLog +++ b/gcc/f/ChangeLog @@ -1,3 +1,7 @@ +2002-05-31 Matthew Woodcraft + + * lang-specs.h: Use cpp_debug_options. + 2002-05-28 Zack Weinberg * bld.c, com.c, expr.c, target.c: Include real.h. diff --git a/gcc/f/lang-specs.h b/gcc/f/lang-specs.h index e39a3e9b5b2..c22837a7b93 100644 --- a/gcc/f/lang-specs.h +++ b/gcc/f/lang-specs.h @@ -28,7 +28,9 @@ the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA {".fpp", "@f77-cpp-input", 0}, {".FPP", "@f77-cpp-input", 0}, {"@f77-cpp-input", - "tradcpp0 -lang-fortran %(cpp_options) %{!M:%{!MM:%{!E:%{!pipe:%g.f} |\n\ + "tradcpp0 -lang-fortran %(cpp_options) \ + %{E|M|MM:%(cpp_debug_options)}\ + %{!M:%{!MM:%{!E:%{!pipe:%g.f} |\n\ f771 %{!pipe:%g.f} %(cc1_options) %{I*} %{!fsyntax-only:%(invoke_as)}}}}", 0}, {".r", "@ratfor", 0}, {"@ratfor", diff --git a/gcc/gcc.c b/gcc/gcc.c index f5e70ca6b02..50b219f3569 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -694,9 +694,13 @@ static const char *cpp_unique_options = /* This contains cpp options which are common with cc1_options and are passed only when preprocessing only to avoid duplication. */ static const char *cpp_options = -"%(cpp_unique_options) %{std*} %{d*} %{W*&pedantic*} %{w} %{m*} %{f*}\ +"%(cpp_unique_options) %{std*} %{W*&pedantic*} %{w} %{m*} %{f*}\ %{O*} %{undef}"; +/* This contains cpp options which are not passed when the preprocessor + output will be used by another program. */ +static const char *cpp_debug_options = "%{d*}"; + /* NB: This is shared amongst all front-ends. */ static const char *cc1_options = "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ @@ -832,7 +836,8 @@ static const struct compiler default_compilers[] = {"@c", /* cc1 has an integrated ISO C preprocessor. We should invoke the external preprocessor if -save-temps is given. */ - "%{E|M|MM:%(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options)}\ + "%{E|M|MM:%(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options)\ + %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ %{traditional|ftraditional:\ %eGNU C no longer supports -traditional without -E}\ @@ -848,7 +853,8 @@ static const struct compiler default_compilers[] = {".h", "@c-header", 0}, {"@c-header", "%{!E:%ecompilation of header file requested} \ - %(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options)", 0}, + %(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options) %(cpp_debug_options)", + 0}, {".i", "@cpp-output", 0}, {"@cpp-output", "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0}, @@ -858,6 +864,7 @@ static const struct compiler default_compilers[] = {".S", "@assembler-with-cpp", 0}, {"@assembler-with-cpp", "%(trad_capable_cpp) -lang-asm %(cpp_options)\ + %{E|M|MM:%(cpp_debug_options)}\ %{!M:%{!MM:%{!E:%{!S:-o %{|!pipe:%g.s} |\n\ as %(asm_debug) %(asm_options) %{!pipe:%g.s} %A }}}}", 0}, #include "specs.h" @@ -1369,6 +1376,7 @@ static struct spec_list static_specs[] = INIT_STATIC_SPEC ("invoke_as", &invoke_as), INIT_STATIC_SPEC ("cpp", &cpp_spec), INIT_STATIC_SPEC ("cpp_options", &cpp_options), + INIT_STATIC_SPEC ("cpp_debug_options", &cpp_debug_options), INIT_STATIC_SPEC ("cpp_unique_options", &cpp_unique_options), INIT_STATIC_SPEC ("trad_capable_cpp", &trad_capable_cpp), INIT_STATIC_SPEC ("cc1", &cc1_spec), diff --git a/gcc/objc/lang-specs.h b/gcc/objc/lang-specs.h index 6cc17f79029..e4c1e0fbaa6 100644 --- a/gcc/objc/lang-specs.h +++ b/gcc/objc/lang-specs.h @@ -25,7 +25,8 @@ Boston, MA 02111-1307, USA. */ {"@objective-c", /* cc1obj has an integrated ISO C preprocessor. We should invoke the external preprocessor if -save-temps or -traditional is given. */ - "%{E|M|MM:%(trad_capable_cpp) -lang-objc %{ansi:-std=c89} %(cpp_options)}\ + "%{E|M|MM:%(trad_capable_cpp)\ + -lang-objc %{ansi:-std=c89} %(cpp_options) %(cpp_debug_options)}\ %{!E:%{!M:%{!MM:\ %{traditional|ftraditional|traditional-cpp:\ %eGNU Objective C no longer supports traditional compilation}\