diff options
author | Zack Weinberg <zack@rabi.phys.columbia.edu> | 1999-05-17 23:37:19 +0000 |
---|---|---|
committer | Jeff Law <law@gcc.gnu.org> | 1999-05-17 17:37:19 -0600 |
commit | eeb183e9c7a61a80616950475e9cb76565537653 (patch) | |
tree | 662f9ef1f6360e03f9a4e747bf73cf9551fe3fa3 /gcc/cppspec.c | |
parent | 49933dbade0ebe5d04684912166b5494f8b948bb (diff) | |
download | gcc-eeb183e9c7a61a80616950475e9cb76565537653.zip gcc-eeb183e9c7a61a80616950475e9cb76565537653.tar.gz gcc-eeb183e9c7a61a80616950475e9cb76565537653.tar.bz2 |
cppspec.c: Insert -no-gcc into command line unless -gcc was given by user.
* 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.
From-SVN: r26990
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 2908b73..2e02216 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) |