Initial import from FreeBSD RELENG_4:
[games.git] / contrib / gcc / cp / lang-specs.h
1 /* Definitions for specs for C++.
2    Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000 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:cpp0 -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}\
37         -D__cplusplus\
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         %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
43         %i %{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}}\n}\
44       %{!E:%{!M:%{!MM:cc1plus %i %1 %2\
45                             -lang-c++ %{nostdinc*} %{C} %{A*} %{I*} %{P} %{$} %I\
46                             %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
47                             %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1\
48                             -D__GNUC_MINOR__=%v2} -D__cplusplus\
49                             %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
50                             %{!fno-exceptions:-D__EXCEPTIONS}\
51                             %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}}\
52                             %{ffast-math:-D__FAST_MATH__}\
53                             %{trigraphs}\
54                             %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
55                             %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
56                             %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
57                             %{v:-version} %{pg:-p} %{p}\
58                             %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
59                             %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
60                             %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
61               %{!S:as %a %Y\
62                       %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
63                       %{!pipe:%g.s} %A\n }}}}"}},
64 #else /* ! USE_CPPLIB */
65    {"cpp0 -lang-c++ %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %{$} %I\
66         %{C:%{!E:%eGNU C++ does not support -C without using -E}}\
67         %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
68         %{!no-gcc:-D__GNUC__=%v1 -D__GNUG__=%v1 -D__GNUC_MINOR__=%v2}\
69         -D__cplusplus\
70         %{ansi:-trigraphs -D__STRICT_ANSI__} %{!undef:%{!ansi:%p} %P}\
71         %{!fno-exceptions:-D__EXCEPTIONS}\
72         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} %{trigraphs}\
73         %{ffast-math:-D__FAST_MATH__}\
74         %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
75         %i %{!M:%{!MM:%{!E:%{!pipe:%g.ii}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
76     "%{!M:%{!MM:%{!E:cc1plus %{!pipe:%g.ii} %1 %2\
77                             %{!Q:-quiet} -dumpbase %b.cc %{d*} %{m*} %{a}\
78                             %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
79                             %{v:-version} %{pg:-p} %{p}\
80                             %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
81                             %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
82                             %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}}|\n\
83               %{!S:as %a %Y\
84                       %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
85                       %{!pipe:%g.s} %A\n }}}}"}},
86 #endif /* ! USE_CPPLIB */
87   {".ii", {"@c++-cpp-output"}},
88   {"@c++-cpp-output",
89    {"%{!M:%{!MM:%{!E:cc1plus %i %1 %2 %{!Q:-quiet} %{d*} %{m*} %{a}\
90                             %{g*} %{O*} %{W*} %{w} %{pedantic*} %{ansi}\
91                             %{v:-version} %{pg:-p} %{p}\
92                             %{f*} %{+e*} %{aux-info*} %{Qn:-fno-ident}\
93                             %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
94                             %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
95                     %{!S:as %a %Y\
96                             %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
97                             %{!pipe:%g.s} %A\n }}}}"}},