Commit e5f5feea by Neil Booth Committed by Neil Booth

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
parent 317638a8
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> 2002-05-14 Vladimir Makarov <vmakarov@redhat.com>
* genautomata.c (transform_3): Add code for transformation * genautomata.c (transform_3): Add code for transformation
......
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> 2002-05-13 Jason Merrill <jason@redhat.com>
* class.c (build_vtbl_ref_1): Use fixed_type_or_null. * class.c (build_vtbl_ref_1): Use fixed_type_or_null.
......
...@@ -35,13 +35,13 @@ Boston, MA 02111-1307, USA. */ ...@@ -35,13 +35,13 @@ Boston, MA 02111-1307, USA. */
{"@c++", {"@c++",
/* cc1plus has an integrated ISO C preprocessor. We should invoke /* cc1plus has an integrated ISO C preprocessor. We should invoke
the external preprocessor if -save-temps is given. */ 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}\ %{!Wno-deprecated:-D__DEPRECATED}\
%{!fno-exceptions:-D__EXCEPTIONS}\ %{!fno-exceptions:-D__EXCEPTIONS}\
-D__GXX_ABI_VERSION=100\ -D__GXX_ABI_VERSION=100\
%{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\ %{ansi:-D__STRICT_ANSI__ -trigraphs -$} %(cpp_options)}\
%{!E:%{!M:%{!MM:\ %{!E:%{!M:%{!MM:\
%{save-temps:cc1plus -E -lang-c++ \ %{save-temps:cc1plus -E \
%{!no-gcc:-D__GNUG__=%v1}\ %{!no-gcc:-D__GNUG__=%v1}\
%{!Wno-deprecated:-D__DEPRECATED}\ %{!Wno-deprecated:-D__DEPRECATED}\
%{!fno-exceptions:-D__EXCEPTIONS}\ %{!fno-exceptions:-D__EXCEPTIONS}\
......
...@@ -665,6 +665,9 @@ static const char *link_libgcc_spec = LINK_LIBGCC_SPEC; ...@@ -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 of the GCC driver can correctly drive older tool chains with the
appropriate -B options. */ 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 = static const char *trad_capable_cpp =
"%{traditional|ftraditional|traditional-cpp:tradcpp0}\ "%{traditional|ftraditional|traditional-cpp:tradcpp0}\
%{!traditional:%{!ftraditional:%{!traditional-cpp:cc1 -E}}}"; %{!traditional:%{!ftraditional:%{!traditional-cpp:cc1 -E}}}";
...@@ -690,11 +693,8 @@ static const char *cpp_unique_options = ...@@ -690,11 +693,8 @@ static const char *cpp_unique_options =
/* This contains cpp options which are common with cc1_options and are passed /* This contains cpp options which are common with cc1_options and are passed
only when preprocessing only to avoid duplication. */ only when preprocessing only to avoid duplication. */
static const char *cpp_options = static const char *cpp_options =
"%(cpp_unique_options) %{std*} %{d*} %{W*&pedantic*} %{w}\ "%(cpp_unique_options) %{std*} %{d*} %{W*&pedantic*} %{w} %{m*} %{f*}\
%{fshow-column} %{fno-show-column}\ %{undef}";
%{fsigned-char&funsigned-char}\
%{fleading-underscore} %{fno-leading-underscore}\
%{fno-operator-names} %{ftabstop=*} %{undef}";
/* NB: This is shared amongst all front-ends. */ /* NB: This is shared amongst all front-ends. */
static const char *cc1_options = static const char *cc1_options =
...@@ -831,23 +831,23 @@ static const struct compiler default_compilers[] = ...@@ -831,23 +831,23 @@ static const struct compiler default_compilers[] =
{"@c", {"@c",
/* cc1 has an integrated ISO C preprocessor. We should invoke the /* cc1 has an integrated ISO C preprocessor. We should invoke the
external preprocessor if -save-temps is given. */ 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:\ %{!E:%{!M:%{!MM:\
%{traditional|ftraditional:\ %{traditional|ftraditional:\
%eGNU C no longer supports -traditional without -E}\ %eGNU C no longer supports -traditional without -E}\
%{save-temps|traditional-cpp:%(trad_capable_cpp) \ %{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)}\ cc1 -fpreprocessed %b.i %(cc1_options)}\
%{!save-temps:%{!traditional-cpp:\ %{!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}, %{!fsyntax-only:%(invoke_as)}}}}", 0},
{"-", {"-",
"%{!E:%e-E required when input is from standard input}\ "%{!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}, {".h", "@c-header", 0},
{"@c-header", {"@c-header",
"%{!E:%ecompilation of header file requested} \ "%{!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}, {".i", "@cpp-output", 0},
{"@cpp-output", {"@cpp-output",
"%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0}, "%{!M:%{!MM:%{!E:cc1 -fpreprocessed %i %(cc1_options) %{!fsyntax-only:%(invoke_as)}}}}", 0},
......
...@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */ ...@@ -29,7 +29,7 @@ Boston, MA 02111-1307, USA. */
%{!E:%{!M:%{!MM:\ %{!E:%{!M:%{!MM:\
%{traditional|ftraditional|traditional-cpp:\ %{traditional|ftraditional|traditional-cpp:\
%eGNU Objective C no longer supports traditional compilation}\ %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\ %(cpp_options) %b.mi \n\
cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}}\ cc1obj -fpreprocessed %b.mi %(cc1_options) %{gen-decls}}\
%{!save-temps:\ %{!save-temps:\
......
...@@ -641,6 +641,10 @@ main (argc, argv) ...@@ -641,6 +641,10 @@ main (argc, argv)
flag_signed_char = 0; flag_signed_char = 0;
break; break;
/* Ignore target-specific flags. */
case 'm':
break;
case 'M': case 'M':
{ {
char *p = NULL; char *p = NULL;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment