1 /* Definitions for specs for C++.
2 Copyright (C) 1995 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 #define CPP_FOR_CXX "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 -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
37 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
38 %{!fno-exceptions:-D__EXCEPTIONS}\
39 %{fhonor-std:-D__HONOR_STD} %{fnew-abi:-D__HONOR_STD}\
40 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
41 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
42 %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n"
45 "%{!E:%{M:"CPP_FOR_CXX"}"
46 "%{!M:%{MM:"CPP_FOR_CXX"}"
47 "%{!MM:cc1plus %i %1 %2\
48 -lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %I\
49 -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus\
51 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
52 %{!fno-exceptions:-D__EXCEPTIONS}\
53 %{fhonor-std:-D__HONOR_STD} %{fnew-abi:-D__HONOR_STD}\
54 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
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*}\
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 }}}}"}},
67 #else /* ! USE_CPPLIB */
68 {"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
69 %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
70 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
71 -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
72 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
73 %{!fno-exceptions:-D__EXCEPTIONS}\
74 %{fhonor-std:-D__HONOR_STD} %{fnew-abi:-D__HONOR_STD}\
75 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
76 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
77 %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
78 "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
79 %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
80 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
81 %{v:-version} %{pg:-p} %{p}\
82 %{f*} %{+e*} %{aux-info*}\
83 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
84 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
86 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
87 %{!pipe:%g.s} %A\n }}}}"}},
88 #endif /* ! USE_CPPLIB */
89 {".ii", {"@c++-cpp-output"}},
91 {"%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
92 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
93 %{v:-version} %{pg:-p} %{p}\
94 %{f*} %{+e*} %{aux-info*}\
95 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
96 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
98 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
99 %{!pipe:%g.s} %A\n }}}}"}},