diff options
author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-17 23:37:19 +0000 |
---|---|---|
committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 1999-05-17 23:37:19 +0000 |
commit | e46f56735efc7e6083f08782e79738fdc52ca0ed (patch) | |
tree | 662f9ef1f6360e03f9a4e747bf73cf9551fe3fa3 /gcc/cppspec.c | |
parent | 1c22039ab64be7d28cda45cc9896ad4e02b3ad16 (diff) | |
download | gcc-e46f56735efc7e6083f08782e79738fdc52ca0ed.tar.gz |
* cppspec.c: Insert -no-gcc into command line unless -gcc was
given by user.
* gcc.c (default_compilers): Define __GNUC__ and
__GNUC_MINOR__ only if -no-gcc was not given.
* objc/lang-specs.h: Likewise.
* cpp.texi: Document -x and -std options; explain that -lang
is no longer supported. Minor related corrections.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@26990 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppspec.c')
-rw-r--r-- | gcc/cppspec.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/cppspec.c b/gcc/cppspec.c index 2908b739368..2e0221626e3 100644 --- a/gcc/cppspec.c +++ b/gcc/cppspec.c @@ -84,6 +84,9 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries) /* Do we need to insert -E? */ int need_E = 1; + /* Do we need to insert -no-gcc? */ + int need_no_gcc = 1; + /* Have we seen an input file? */ int seen_input = 0; @@ -135,6 +138,8 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries) } else if (argv[i][1] == 'x') need_fixups = 0; + else if (argv[i][1] == 'g' && !strcmp(&argv[i][2], "cc")) + need_no_gcc = 0; else if (WORD_SWITCH_TAKES_ARG (&argv[i][1])) quote = 1; } @@ -183,7 +188,7 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries) /* If we don't need to edit the command line, we can bail early. */ - new_argc = argc + need_E + read_stdin + new_argc = argc + need_E + need_no_gcc + read_stdin + !!o_here + !!lang_c_here + !!lang_S_here; if (new_argc == argc) @@ -197,6 +202,9 @@ lang_specific_driver (errfn, in_argc, in_argv, in_added_libraries) if (need_E) new_argv[j++] = "-E"; + if (need_no_gcc) + new_argv[j++] = "-no-gcc"; + for (i = 1; i < argc; i++, j++) { if (i == lang_c_here) |