OSDN Git Service

(default_compilers, ".C" and ".ii"): Pass `+e*' into cc1plus.
authorbrendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Sep 1992 20:10:54 +0000 (20:10 +0000)
committerbrendan <brendan@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 2 Sep 1992 20:10:54 +0000 (20:10 +0000)
(process_command): Allow +e[012] to be passed down into cc1plus.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@2036 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/gcc.c

index c6f6860..e353efa 100644 (file)
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -504,7 +504,7 @@ static struct compiler default_compilers[] =
    "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.i} %1 %2\
                   %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
                   %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} %{traditional}\
-                  %{v:-version} %{pg:-p} %{p} %{f*}\
+                  %{v:-version} %{pg:-p} %{p} %{f*} %{+e*}\
                   %{aux-info*}\
                   %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
                   %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
@@ -525,7 +525,7 @@ static struct compiler default_compilers[] =
   {"@c++-cpp-output",
    "cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
            %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} %{traditional}\
-           %{v:-version} %{pg:-p} %{p} %{f*}\
+           %{v:-version} %{pg:-p} %{p} %{f*} %{+e*}\
            %{aux-info*}\
            %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
            %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
@@ -2017,6 +2017,9 @@ process_command (argc, argv)
          /* Record the part after the last comma.  */
          assembler_options[n_assembler_options - 1] = argv[i] + prev;
        }
+      else if (argv[i][0] == '+' && argv[i][1] == 'e')
+       /* Compensate for the +e options to the C++ front-end.  */
+       n_switches++;
       else if (argv[i][0] == '-' && argv[i][1] != 0 && argv[i][1] != 'l')
        {
          register char *p = &argv[i][1];
@@ -2097,6 +2100,18 @@ process_command (argc, argv)
 
   add_prefix (&startfile_prefix, standard_exec_prefix, 0, 1, NULL_PTR);
   add_prefix (&startfile_prefix, standard_exec_prefix_1, 0, 1, NULL_PTR);
+      else if (argv[i][0] == '+' && argv[i][1] == 'e')
+       {
+         /* Compensate for the +e options to the C++ front-end;
+            they're there simply for cfront call-compatability.  We do
+            some magic in default_compilers to pass them down properly.
+            Note we deliberately start at the `+' here, to avoid passing
+            -e0 or -e1 down into the linker.  */
+         switches[n_switches].part1 = &argv[i][0];
+         switches[n_switches].args = 0;
+         switches[n_switches].valid = 0;
+         n_switches++;
+       }
 
   /* More prefixes are enabled in main, after we read the specs file
      and determine whether this is cross-compilation or not.  */