aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-05-14 17:12:16 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-05-14 17:12:16 +0000
commite5f5feea65f904d95c6f7aded34f8d2f447141e9 (patch)
tree2022704678991b7ecc0f132d9965f45e1fb9c533 /gcc/gcc.c
parent317638a8098ccaf5e154f2e73c79fd14d30a25b5 (diff)
downloadgcc-e5f5feea65f904d95c6f7aded34f8d2f447141e9.zip
gcc-e5f5feea65f904d95c6f7aded34f8d2f447141e9.tar.gz
gcc-e5f5feea65f904d95c6f7aded34f8d2f447141e9.tar.bz2
gcc.c (cpp_options): Must pass -m* and -f* options to the front end even when only preprocessing.
* 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
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/gcc/gcc.c b/gcc/gcc.c
index f673812..b967272 100644
--- 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},