diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-14 17:12:16 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-05-14 17:12:16 +0000 |
commit | 62683efd664db1e99f350c2a5871212bafdee92c (patch) | |
tree | 2022704678991b7ecc0f132d9965f45e1fb9c533 | |
parent | f130829524a6ed8c65767b02d5c7daefbc1d4583 (diff) | |
download | gcc-62683efd664db1e99f350c2a5871212bafdee92c.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@53460 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/cp/ChangeLog | 4 | ||||
-rw-r--r-- | gcc/cp/lang-specs.h | 4 | ||||
-rw-r--r-- | gcc/gcc.c | 20 | ||||
-rw-r--r-- | gcc/objc/lang-specs.h | 2 | ||||
-rw-r--r-- | gcc/tradcpp.c | 4 |
6 files changed, 30 insertions, 13 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8ff713550ef..7aaa4d2d1ba 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index d5facc540d3..12e90cf74fc 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -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. diff --git a/gcc/cp/lang-specs.h b/gcc/cp/lang-specs.h index 771ab59963f..04050063ba2 100644 --- a/gcc/cp/lang-specs.h +++ b/gcc/cp/lang-specs.h @@ -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}\ diff --git a/gcc/gcc.c b/gcc/gcc.c index f673812888e..b9672721efa 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}, diff --git a/gcc/objc/lang-specs.h b/gcc/objc/lang-specs.h index c6d1f9aa0e1..6cc17f79029 100644 --- a/gcc/objc/lang-specs.h +++ b/gcc/objc/lang-specs.h @@ -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:\ diff --git a/gcc/tradcpp.c b/gcc/tradcpp.c index 6381c2dc4e4..203b8cc7b39 100644 --- a/gcc/tradcpp.c +++ b/gcc/tradcpp.c @@ -641,6 +641,10 @@ main (argc, argv) flag_signed_char = 0; break; + /* Ignore target-specific flags. */ + case 'm': + break; + case 'M': { char *p = NULL; |