diff options
author | Dave Brolley <brolley@cygnus.com> | 1998-06-10 10:12:36 +0000 |
---|---|---|
committer | Dave Brolley <brolley@gcc.gnu.org> | 1998-06-10 06:12:36 -0400 |
commit | a0d85b7572a80c023a0eef537a8c94e6af280c51 (patch) | |
tree | 34e222e6636a47fccb9290f46b926d67612b47a9 /gcc/gcc.c | |
parent | 0875c2f39b0d864b3dcd220b4f594b58d48e82f1 (diff) | |
download | gcc-a0d85b7572a80c023a0eef537a8c94e6af280c51.zip gcc-a0d85b7572a80c023a0eef537a8c94e6af280c51.tar.gz gcc-a0d85b7572a80c023a0eef537a8c94e6af280c51.tar.bz2 |
Integrate cpplib into the C and C++ front ends.
Wed Jun 10 13:07:02 1998 Dave Brolley <brolley@cygnus.com>
* objc/objc-act.c: Add cpplib declarations.
(lang_decode_option): Initialize cpplib if necessary.
(lang_decode_option): New argc/argv interface.
* tree.h (lang_decode_option): New argc/argv interface.
* toplev.c (lang_options): Add cpp options.
(main): New interface for lang_decode_option.
* gcc.c (default_compilers): Don't call cpp for a cpplib-enabled C compiler
unless -E, -M or -MM is specified.
* cpplib.h (cpp_handle_option): New function.
* cpplib.c (cpp_handle_option): New function.
(cpp_handle_options): Now calls cpp_handle_option.
* c-tree.h (c_decode_option): New argc/argv interface.
* c-lex.c (init_parse): cpplib now initialized in c_decode_option.
* c-lang.c (lang_decode_option): New argc/argv interface.
* c-decl.c: Add cpplib declarations.
(c_decode_option): New argc/argv interface.
(c_decode_option): Call cpp_handle_option.
(c_decode_option): Now returns number of strings processed.
From-SVN: r20407
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r-- | gcc/gcc.c | 47 |
1 files changed, 44 insertions, 3 deletions
@@ -597,7 +597,46 @@ static struct compiler default_compilers[] = /* Next come the entries for C. */ {".c", {"@c"}}, {"@c", - {"cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ + { +#if USE_CPPLIB +#define CPP_FOR_C \ + "cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ + %{C:%{!E:%eGNU C does not support -C without using -E}}\ + %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ + -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ + %{ansi:-trigraphs -D__STRICT_ANSI__}\ + %{!undef:%{!ansi:%p} %P} %{trigraphs} \ + %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ + %{traditional} %{ftraditional:-traditional}\ + %{traditional-cpp:-traditional}\ + %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ + %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n" + + "%{E:"CPP_FOR_C"}" + "%{!E:%{M:"CPP_FOR_C"}" + "%{!M:%{MM:"CPP_FOR_C"}" + "%{!MM:cc1 %i %1 \ + -lang-c%{ansi:89} %{nostdinc*} %{A*} %{I*} %I\ + %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\ + %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ + -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ + %{ansi:-trigraphs -D__STRICT_ANSI__}\ + %{!undef:%{!ansi:%p} %P} %{trigraphs} \ + %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\ + %{H} %C %{D*} %{U*} %{i*} %Z\ + %{ftraditional:-traditional}\ + %{traditional-cpp:-traditional}\ + %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\ + %{aux-info*}\ + %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \ + %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ + %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ + %{!S:as %a %Y\ + %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ + %{!pipe:%g.s} %A\n }}}}" + }}, +#else /* ! USE_CPPLIB */ + "cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\ -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\ @@ -608,7 +647,7 @@ static struct compiler default_compilers[] = %{traditional-cpp:-traditional}\ %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\ %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n", - "%{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \ + "%{!M:%{!MM:%{!E:cc1 %{!pipe:%g.i} %1 \ %{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\ %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi} \ %{traditional} %{v:-version} %{pg:-p} %{p} %{f*}\ @@ -617,7 +656,9 @@ static struct compiler default_compilers[] = %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\ %{!S:as %a %Y\ %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\ - %{!pipe:%g.s} %A\n }}}}"}}, + %{!pipe:%g.s} %A\n }}}}" + }}, +#endif /* ! USE_CPPLIB */ {"-", {"%{E:cpp -lang-c%{ansi:89} %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\ %{C:%{!E:%eGNU C does not support -C without using -E}}\ |