aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrendan Kehoe <brendan@gcc.gnu.org>1992-09-02 16:10:54 -0400
committerBrendan Kehoe <brendan@gcc.gnu.org>1992-09-02 16:10:54 -0400
commit301a5c0b57e24135dd231d36de93f2b8121ec987 (patch)
treea90b1756d1b434b024ba5dd23b7255b384de035b
parent82b5625880d00412ff280b4b1ad6a390dc5dedd7 (diff)
downloadgcc-301a5c0b57e24135dd231d36de93f2b8121ec987.zip
gcc-301a5c0b57e24135dd231d36de93f2b8121ec987.tar.gz
gcc-301a5c0b57e24135dd231d36de93f2b8121ec987.tar.bz2
(default_compilers, ".C" and ".ii"): Pass `+e*' into cc1plus.
(process_command): Allow +e[012] to be passed down into cc1plus. From-SVN: r2036
-rw-r--r--gcc/gcc.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index c6f6860..e353efa 100644
--- 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. */