OSDN Git Service

Allow .FOR and .FPP suffixes for Fortran source files
[pf3gnuchains/gcc-fork.git] / gcc / f / lang-specs.h
1 /* lang-specs.h file for Fortran
2    Copyright (C) 1995-1997, 1999 Free Software Foundation, Inc.
3    Contributed by James Craig Burley (burley@gnu.org).
4
5 This file is part of GNU Fortran.
6
7 GNU Fortran is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2, or (at your option)
10 any later version.
11
12 GNU Fortran is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with GNU Fortran; see the file COPYING.  If not, write to
19 the Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
20 02111-1307, USA.
21
22 */
23
24 /* This is the contribution to the `default_compilers' array in gcc.c for
25    g77.  */
26
27   {".F", {"@f77-cpp-input"}},
28   {".fpp", {"@f77-cpp-input"}},
29   {".FPP", {"@f77-cpp-input"}},
30   {"@f77-cpp-input",
31      /* For f77 we want -traditional to avoid errors with, for
32         instance, mismatched '.  Also, we avoid unpleasant surprises
33         with substitution of names not prefixed by `_' by using %P
34         rather than %p (although this isn't consistent with SGI and
35         Sun f77, at least) so you test `__unix' rather than `unix'.
36         -D_LANGUAGE_FORTRAN is used by some compilers like SGI and
37         might as well be in there. */
38    {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I\
39         %{C:%{!E:%eGNU C does not support -C without using -E}}\
40         %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG}\
41         -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2\
42         %{ansi:-trigraphs -$ -D__STRICT_ANSI__}\
43         %{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
44         %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional\
45         %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z\
46         %i %{!M:%{!MM:%{!E:%{!pipe:%g.i}}}}%{E:%W{o*}}%{M:%W{o*}}%{MM:%W{o*}} |\n",
47     "%{!M:%{!MM:%{!E:f771 %{!pipe:%g.i} %(f771) \
48                    %{!Q:-quiet} -dumpbase %b.F %{d*} %{m*} %{a}\
49                    %{g*} %{O*} %{W*} %{w} %{pedantic*} \
50                    %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
51                    %{aux-info*} %{Qn:-fno-ident}\
52                    %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
53                    %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
54               %{!S:as %a %Y\
55                       %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
56                       %{!pipe:%g.s} %A\n }}}}"}},
57   {".r", {"@ratfor"}},
58   {"@ratfor",
59    {"ratfor %{C} %{v}\
60            %{C:%{!E:%eGNU C does not support -C without using -E}}\
61            %{!E:%{!pipe:-o %g.f}}%{E:%W{o*}} %i |\n",
62     "%{!E:f771 %{!pipe:%g.f} %(f771) \
63            %{!Q:-quiet} -dumpbase %b.r %{d*} %{m*} %{a}\
64            %{g*} %{O*} %{W*} %{w} %{pedantic*} \
65            %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
66            %{aux-info*} %{Qn:-fno-ident}\
67            %{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
68            %{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%g.s}} |\n\
69            %{!S:as %a %Y\
70            %{c:%W{o*}%{!o*:-o %w%b%O}}%{!c:-o %d%w%u%O}\
71            %{!pipe:%g.s} %A\n }}"}},
72   {".f", {"@f77"}},
73   {".for", {"@f77"}},
74   {".FOR", {"@f77"}},
75   {"@f77",
76    {"%{!M:%{!MM:%{!E:f771 %i %(f771) \
77                    %{!Q:-quiet} -dumpbase %b.f %{d*} %{m*} %{a}\
78                    %{g*} %{O*} %{W*} %{w} %{pedantic*}\
79                    %{v:-version -fversion} %{pg:-p} %{p} %{f*} %{I*}\
80                    %{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   {"@f77-version",
87    {"cpp -lang-c %{nostdinc*} %{C} %{v} %{A*} %{I*} %{P} %I \
88       %{C:%{!E:%eGNU C does not support -C without using -E}} \
89       %{M} %{MM} %{MD:-MD %b.d} %{MMD:-MMD %b.d} %{MG} \
90       -undef -D__GNUC__=%v1 -D__GNUC_MINOR__=%v2 \
91       %{ansi:-trigraphs -$ -D__STRICT_ANSI__} \
92       %{!undef:%P} -D_LANGUAGE_FORTRAN %{trigraphs} \
93       %c %{Os:-D__OPTIMIZE_SIZE__} %{O*:%{!O0:-D__OPTIMIZE__}} -traditional \
94       %{g*} %{W*} %{w} %{pedantic*} %{H} %{d*} %C %{D*} %{U*} %{i*} %Z \
95       /dev/null /dev/null \n\
96      f771 -fnull-version %(f771) \
97       %{!Q:-quiet} -dumpbase g77-version.f %{d*} %{m*} %{a} \
98       %{g*} %{O*} %{W*} %{w} %{pedantic*} \
99       -version -fversion %{f*} %{I*} -o %g.s /dev/null \n\
100      as %a %Y -o %g%O %g.s %A \n\
101      ld %l %X -o %g %g%O %{A} %{d} %{e*} %{m} %{N} %{n} \
102       %{r} %{s} %{t} %{u*} %{x} %{z} %{Z} \
103       %{!A:%{!nostdlib:%{!nostartfiles:%S}}} \
104       %{static:} %{L*} %D -lg2c -lm \
105       %{!nostdlib:%{!nodefaultlibs:%G %L %G}} \
106       %{!A:%{!nostdlib:%{!nostartfiles:%E}}} \
107       %{T*} \n\
108      %g \n"}},