]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
gcc.c (cpp_options): Must pass -m* and -f* options to the front end even when only...
authorNeil Booth <neil@daikokuya.demon.co.uk>
Tue, 14 May 2002 17:12:16 +0000 (17:12 +0000)
committerNeil Booth <neil@gcc.gnu.org>
Tue, 14 May 2002 17:12:16 +0000 (17:12 +0000)
* gcc.c (cpp_options): Must pass -m* and -f* options
to the front end even when only preprocessing.
(cc1_options): Remove redundant -lang-c.
* tradcpp.c (main): Ignore -m options.
cp:
* lang-specs.h: Remove redundant -lang-c++.
objc:
* lang-specs.h: Similarly.

From-SVN: r53460

gcc/ChangeLog
gcc/cp/ChangeLog
gcc/cp/lang-specs.h
gcc/gcc.c
gcc/objc/lang-specs.h
gcc/tradcpp.c

index 8ff713550efda2437871c6909b552905609a94e9..7aaa4d2d1baefd0e3e581643583971855ee68152 100644 (file)
@@ -1,3 +1,12 @@
+2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * gcc.c (cpp_options): Must pass -m* and -f* options
+       to the front end even when only preprocessing.
+       (cc1_options): Remove redundant -lang-c.
+       * tradcpp.c (main): Ignore -m options.
+objc:
+       * lang-specs.h: Similarly.
+
 2002-05-14  Vladimir Makarov  <vmakarov@redhat.com>
 
        * genautomata.c (transform_3): Add code for transformation
index d5facc540d318404fc1a7deaed8ba686b95c03ad..12e90cf74fc648cc6e13ba1bbb2ae0b406132530 100644 (file)
@@ -1,3 +1,7 @@
+2002-05-14  Neil Booth  <neil@daikokuya.demon.co.uk>
+
+       * lang-specs.h: Remove redundant -lang-c++.
+
 2002-05-13  Jason Merrill  <jason@redhat.com>
 
        * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
index 771ab59963f763917d8f934b45ab4d8ccb4d0afd..04050063ba27c13b024eb86a189ee7d3b8e31af5 100644 (file)
@@ -35,13 +35,13 @@ Boston, MA 02111-1307, USA.  */
   {"@c++",
    /* cc1plus has an integrated ISO C preprocessor.  We should invoke
       the external preprocessor if -save-temps is given.  */
-    "%{E|M|MM:cc1plus -E -lang-c++ %{!no-gcc:-D__GNUG__=%v1}\
+    "%{E|M|MM:cc1plus -E %{!no-gcc:-D__GNUG__=%v1}\
        %{!Wno-deprecated:-D__DEPRECATED}\
        %{!fno-exceptions:-D__EXCEPTIONS}\
        -D__GXX_ABI_VERSION=100\
        %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
      %{!E:%{!M:%{!MM:\
-       %{save-temps:cc1plus -E -lang-c++ \
+       %{save-temps:cc1plus -E \
                    %{!no-gcc:-D__GNUG__=%v1}\
                            %{!Wno-deprecated:-D__DEPRECATED}\
                    %{!fno-exceptions:-D__EXCEPTIONS}\
index f673812888ec7b33c6287a8edf2cfae43e69ad47..b9672721efa269b56e46d60f55f805528f451ceb 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -665,6 +665,9 @@ static const char *link_libgcc_spec = LINK_LIBGCC_SPEC;
    of the GCC driver can correctly drive older tool chains with the
    appropriate -B options.  */
 
+/* When cpplib handles traditional preprocessing, get rid of this, and
+   call cc1 (or cc1obj in objc/lang-specs.h) from the main specs so
+   that we default the front end language better.  */
 static const char *trad_capable_cpp =
 "%{traditional|ftraditional|traditional-cpp:tradcpp0}\
  %{!traditional:%{!ftraditional:%{!traditional-cpp:cc1 -E}}}";
@@ -690,11 +693,8 @@ 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}\
- %{fshow-column} %{fno-show-column}\
- %{fsigned-char&funsigned-char}\
- %{fleading-underscore} %{fno-leading-underscore}\
- %{fno-operator-names} %{ftabstop=*} %{undef}";
+"%(cpp_unique_options) %{std*} %{d*} %{W*&pedantic*} %{w} %{m*} %{f*}\
+ %{undef}";
 
 /* NB: This is shared amongst all front-ends.  */
 static const char *cc1_options =
@@ -831,23 +831,23 @@ 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) -lang-c %{ansi:-std=c89} %(cpp_options)}\
+     "%{E|M|MM:%(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options)}\
       %{!E:%{!M:%{!MM:\
           %{traditional|ftraditional:\
 %eGNU C no longer supports -traditional without -E}\
          %{save-temps|traditional-cpp:%(trad_capable_cpp) \
-               -lang-c %{ansi:-std=c89} %(cpp_options) %b.i \n\
+               %{ansi:-std=c89} %(cpp_options) %b.i \n\
                    cc1 -fpreprocessed %b.i %(cc1_options)}\
          %{!save-temps:%{!traditional-cpp:\
-               cc1 -lang-c %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options)}}\
+               cc1 %{ansi:-std=c89} %(cpp_unique_options) %(cc1_options)}}\
         %{!fsyntax-only:%(invoke_as)}}}}", 0},
   {"-",
    "%{!E:%e-E required when input is from standard input}\
-    %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)", 0},
+    %(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options)", 0},
   {".h", "@c-header", 0},
   {"@c-header",
    "%{!E:%ecompilation of header file requested} \
-    %(trad_capable_cpp) -lang-c %{ansi:-std=c89} %(cpp_options)", 0},
+    %(trad_capable_cpp) %{ansi:-std=c89} %(cpp_options)", 0},
   {".i", "@cpp-output", 0},
   {"@cpp-output",
    "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0},
index c6d1f9aa0e1250e65ada44c1e80c517bd97c179d..6cc17f79029a5d59de2a55039414b7d55e6e72a4 100644 (file)
@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA.  */
       %{!E:%{!M:%{!MM:\
        %{traditional|ftraditional|traditional-cpp:\
 %eGNU Objective C no longer supports traditional compilation}\
-       %{save-temps:cc1obj -E -lang-objc %{ansi:-std=c89}\
+       %{save-temps:cc1obj -E %{ansi:-std=c89}\
          %(cpp_options) %b.mi \n\
            cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}}\
        %{!save-temps:\
index 6381c2dc4e437191aa5b3858b9c87d7b8231e507..203b8cc7b3940a3c87e11ec515e8ccfa232ecbbc 100644 (file)
@@ -641,6 +641,10 @@ main (argc, argv)
          flag_signed_char = 0;
        break;
 
+       /* Ignore target-specific flags.  */
+      case 'm':
+       break;
+
       case 'M':
        {
          char *p = NULL;