OSDN Git Service

Import translated manuals from JM CVS Repository.
[linuxjm/jm.git] / manual / fort77 / original / man1 / fort77.1
1 .Id $Id: fort77.1,v 1.1 1994/11/01 16:53:38 ig25 Exp ig25 $
2 .TH FORT77 1 "Nov 1996" Linux "Linux Programmer's Manual"
3 .SH NAME
4 fort77 \- invoke f2c Fortran translator transparently, like a compiler
5 .SH SYNOPSIS
6 .B fort77
7 .RB [ -c ]
8 .RB [ -g ]
9 .RB [ -v ]
10 .RB [ -k ]
11 .RB [ -P ]
12 .RB [ -cpp ]
13 .RB [ "f2c option ..." ]
14 .RB [ -L
15 .IR "directory ..." ]
16 .RI [ "gcc-option ..." ]
17 .RI [ "link option ..." ]
18 .RB [ -O
19 .IR optlevel ]
20 .RI [ -o
21 .IR outfile ]
22 .RB [ -s ]
23 .RB [ -w ]
24 .RB [ -Wx,arg1 [ ,arg2 ]...]
25 .I "file ..."
26 .SH DESCRIPTION
27 The
28 .B fort77
29 script invokes the
30 .B f2c
31 command transparently, so it can be used like a real Fortran compiler.
32 It can be used to compile Fortran, C and assembler code, and to link
33 it with the f2c libraries.
34 .PP
35 File arguments ending with
36 .B .f
37 are compiled as Fortran source files.
38 Files which end with
39 .B .P
40 are passed through to f2c, and files ending with
41 .B .F
42 are passed to the C preprocessor (invoked as
43 .RB """" "/lib/cpp -traditional" """")
44 first.  Any switches passed via
45 .B -D
46 will be passed to the preprocessor.
47 If the translation is successful, the resulting C files will be passed to
48 .I cc
49 for translation into an object file.
50 Files ending in
51 .BR .c ,
52 .BR .C ,
53 .BR .cc ,
54 .BR .i ,
55 .BR .s ,
56 .BR .S ,
57 .BR .m ,
58 .BR .cc 
59 or
60 .B .cxx
61 are passed to the GNU C compiler directly; see
62 .IR gcc(1) .
63 All other files are passed to the linker.
64 .SH OPTIONS
65 .TP 8
66 .B -c
67 Supress linking and produce an object (
68 .B .o
69 ) file from each source file.
70 .TP 8
71 .B -g
72 Include debugging information.
73 .B -v
74 Be verbose; supplying this twice will also tell the C compilers
75 etc to be verbose.
76 .TP 8
77 .B -k
78 Keep the C files generated by f2c around.
79 .TP 8
80 .B -cpp
81 Pass Fortran code through the C preprocessor, as if filenames
82 ended in
83 .BR .F .
84 .TP 8
85 .BR -P
86 Generate f2c
87 .I ".P "
88 files.
89 .TP 8
90 .BI -L directory
91 Include
92 .I directory
93 in the search for libraries in the final linking stage.
94 .TP 8
95 .B "-o outfile"
96 Send output to
97 .BR outfile .
98 .TP 8
99 .BR -Wx,arg1 [, arg2 ...]
100 Pass the argument[s]
101 .B argi
102 through to the subprocess
103 .BR x ,
104 where
105 .B x
106 can assume one of the following values:
107 .B f
108 for the f2c step,
109 .B p
110 for the preprocessing step,
111 .B c
112 for the C compiler,
113 .B a
114 for the assembler (this is actually passed to the C compiler, too), and
115 .B l
116 for the linker.
117 As an example, defining a preprocessor constant for the C compilation
118 step would be done with
119 .BR "-Wc,-DUNIX=1" .
120 Specifying the
121 .B -f
122 option to f2c would be done via
123 .BR "-Wf,-f" .
124 .TP 8
125 .B "f2c option"
126 .B fort77
127 passes through almost all
128 .B f2c
129 options:
130 .BR -C ,
131 .BR -U ,
132 .BR -u ,
133 .BR -a ,
134 .BR -E ,
135 .BR -h ,
136 .BR -P ,
137 .BR -R ,
138 .BR -r ,
139 .BR -z ,
140 .BR -I2 ,
141 .BR -I4 ,
142 .BR -onetrip ,
143 .BR -!c ,
144 .BR -!l ,
145 .BR -!P ,
146 .BR -!R ,
147 .BR -ext ,
148 .BR -!bs ,
149 .BR -W[n] ,
150 .BR -w8 
151 .BR -r8
152 and
153 .BR -w66 .
154 .TP 8
155 .B "gcc options"
156 The following options are passed through to gcc:
157 .BR -f* ,
158 .BR -W* ,
159 .BR -U* ,
160 .BR -A* ,
161 .BR -m* ,
162 .BR -S ,
163 .BR -E ,
164 .BR -v ,
165 .BR -x ,
166 .BR -pipe ,
167 .BR -o ,
168 .BR -I ,
169 .BR -V ,
170 .BR -b* ,
171 .BR -p ,
172 .BR -pg .
173 .TP 8
174 .B "linker option"
175 The options passed to the linking stage are
176 .BR -static ,
177 .BR -shared ,
178 .BR -v ,
179 .BR -V ,
180 and
181 .BR -symbolic .
182 .SH BUGS
183 To make debugging work, you need to set a breakpoint at
184 .B MAIN__
185 before you start.
186 .PP
187 .B f2c
188 This script automatically supplies the
189 .B -I.
190 option to
191 .BR f2c .
192 Older versions of
193 .BR f2c 
194 may not support this.
195 .PP
196 This script is for the interaction of gcc and f2c; using it with
197 another compiler will probably require modification.
198 .PP
199 The
200 .B -ffast-math
201 option is implied in -O, unlike gcc.
202 If this causes problems, it can be overridden with
203 .BR -fnofast-math .
204 .PP
205 The
206 .B fort77
207 script does not strictly conform to Posix.2, because it acceppts
208 long options with one leading slash.  This is done for gcc
209 compatibility.
210 .SH AUTHOR
211 Thomas Koenig, ig25@rz.uni-karlsruhe.de