1 /* Definitions for specs for C++.
2 Copyright (C) 1995, 96-98, 1999 Free Software Foundation, Inc.
4 This file is part of GNU CC.
6 GNU CC is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU CC is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU CC; see the file COPYING. If not, write to
18 the Free Software Foundation, 59 Temple Place - Suite 330,
19 Boston, MA 02111-1307, USA. */
21 /* This is the contribution to the `default_compilers' array in gcc.c for
33 "%{E|M|MM:cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
34 %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
35 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
36 %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\
38 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
39 %{!fno-exceptions:-D__EXCEPTIONS}\
40 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
41 %{ffast-math:-D__FAST_MATH__}\
42 %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
43 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
44 %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}\
45 %{!E:%{!M:%{!MM:cc1plus %i %1 %2\
46 -lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %{$} %I\
47 %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
48 %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1\
49 -D__GNUC_MINOR__=%v2} -D__cplusplus\
50 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
51 %{!fno-exceptions:-D__EXCEPTIONS}\
52 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
53 %{ffast-math:-D__FAST_MATH__}\
54 %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
56 %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
57 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
58 %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
59 %{v:-version} %{pg:-p} %{p}\
60 %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
61 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
62 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
64 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
65 %{!pipe:%g.s} %A\n }}}}"}},
66 #else /* ! USE_CPPLIB */
67 {"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
68 %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
69 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
70 %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\
72 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
73 %{!fno-exceptions:-D__EXCEPTIONS}\
74 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
75 %{ffast-math:-D__FAST_MATH__}\
76 %{fshort-wchar:-D__WCHAR_TYPE__=short\\ unsigned\\ int}\
77 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
78 %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
79 "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
80 %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
81 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
82 %{v:-version} %{pg:-p} %{p}\
83 %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
84 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
85 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
87 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
88 %{!pipe:%g.s} %A\n }}}}"}},
89 #endif /* ! USE_CPPLIB */
90 {".ii", {"@c++-cpp-output"}},
92 {"%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
93 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
94 %{v:-version} %{pg:-p} %{p} -fpreprocessed\
95 %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
96 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
97 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
99 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
100 %{!pipe:%g.s} %A\n }}}}"}},