]> git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/cp/lang-specs.h
lang-specs.h (default_compilers): Pass -MD, -MMD and -MG to cc1plus if configured...
[thirdparty/gcc.git] / gcc / cp / lang-specs.h
1 /* Definitions for specs for C++.
2 Copyright (C) 1995, 96-97, 1998 Free Software Foundation, Inc.
3
4 This file is part of GNU CC.
5
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)
9 any later version.
10
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.
15
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. */
20
21 /* This is the contribution to the `default_compilers' array in gcc.c for
22 g++. */
23
24 {".cc", {"@c++"}},
25 {".cp", {"@c++"}},
26 {".cxx", {"@c++"}},
27 {".cpp", {"@c++"}},
28 {".c++", {"@c++"}},
29 {".C", {"@c++"}},
30 {"@c++",
31 #if USE_CPPLIB
32 {
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 -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 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
40 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
41 %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}\
42 %{!E:%{!M:%{!MM:cc1plus %i %1 %2\
43 -lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %I\
44 %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
45 -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus\
46 -D__GNUC_MINOR__=%v2\
47 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
48 %{!fno-exceptions:-D__EXCEPTIONS}\
49 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
50 %{trigraphs}\
51 %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
52 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
53 %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
54 %{v:-version} %{pg:-p} %{p}\
55 %{f*} %{+e*} %{aux-info*}\
56 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
57 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
58 %{!S:as %a %Y\
59 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
60 %{!pipe:%g.s} %A\n }}}}"}},
61 #else /* ! USE_CPPLIB */
62 {"cpp -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
63 %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
64 %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
65 -undef -D__GNUC__=%v1 -D__GNUG__=%v1 -D__cplusplus -D__GNUC_MINOR__=%v2\
66 %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
67 %{!fno-exceptions:-D__EXCEPTIONS}\
68 %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
69 %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
70 %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
71 "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
72 %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
73 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
74 %{v:-version} %{pg:-p} %{p}\
75 %{f*} %{+e*} %{aux-info*}\
76 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
77 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
78 %{!S:as %a %Y\
79 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
80 %{!pipe:%g.s} %A\n }}}}"}},
81 #endif /* ! USE_CPPLIB */
82 {".ii", {"@c++-cpp-output"}},
83 {"@c++-cpp-output",
84 {"%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
85 %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
86 %{v:-version} %{pg:-p} %{p}\
87 %{f*} %{+e*} %{aux-info*}\
88 %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
89 %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
90 %{!S:as %a %Y\
91 %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
92 %{!pipe:%g.s} %A\n }}}}"}},