.\" .\" Copyright (c) 1999 .\" Steven G. Kargl. All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without .\" modification, are permitted provided that the following conditions are met: .\" .\" 1. Redistributions of source code must retain the above copyright notice, .\" this list of conditions and the following disclaimer. .\" .\" 2. Redistributions in binary form must reproduce the above copyright notice, .\" this list of conditions and the following disclaimer in the documentation .\" and/or other materials provided with the distribution. .\" .\" This software is provided by Steven G. Kargl and contributors ``as is'' and .\" any express or implied warranties, including, but not limited to, the implied .\" warranties of merchantability and fitness for a particular purpose are .\" disclaimed. In no event shall Steven G. Kargl or contributors be liable for .\" any direct, indirect, incidental, special, exemplary, or consequential .\" damages (including, but not limited to, procurement of substitute goods or .\" services; loss of use, data, or profits; or business interruption) however .\" caused and on any theory of liability, whether in contract, strict liability, .\" or tort (including negligence or otherwise) arising in any way out of the .\" use of this software, even if advised of the possibility of such damage. .\" .Dd January 16, 1999 .Dt F77 1 .Sh NAME .Nm f77 .Nd Fortran 77 driver for f2c and a C compiler .Sh SYNOPSIS .Nm f77 .Op options file .Op -Ldir .Op -lib .Sh DESCRIPTION .Nm can be used to compile Fortran 77 source code. It uses .Xr f2c 1 and .Xr gcc 1 as well as either Sun Microsystem's .Xr fpp 1 Fortran 77 preprocessor or the standard C preprocessor .Xr cpp 1 . The choice of preprocessor was chosen during installation of .Nm f77 , and it may be determined by .Em f77 -V -E file.F. .Pp .Nm recognizes many of the options of .Xr f2c 1 , and ignores those that are not applicable to compilation proper. For example, the .Fl C++ option to produce C++ code is ignored. Depending on the preprocessor chosen, .Xr cpp 1 or .Xr fpp 1 , some options are recognized and passed to the command. .Nm does not recognize any .Xr gcc 1 options except those that may be specified to one of the other stages. For example, .Fl v is passed to both f2c and gcc. Any option that is not recognized by .Nm is passed through to gcc. gcc options that accept a whitespace delimited argument are not supported (e.g., .Fl x Ar language ). .Pp During the linking stage, .Fl lf2c and .Fl lm are automatically added to the linking command. The location of libf2c.a is also added. .Pp The input source file names must have one of the following forms: .Em *.F , .Em *.f , .Em *.o , and .Em *.a . A file ending with .Em F is a source file that will preprocessed before translation by f2c and compilation by gcc. A file ending with .Em f should contain Fortran 77 source code, and it will not be preprocessed. Files with a .Em o extension are assumed to be object modules, and these will be passed to the linking stage. Files with a .Em a extension are assumed to be libraries, and these are passed to the linking statge. .Sh OPTIONS .Bl -tag -width flag .It Fl 1 [f2c] Execute DO LOOPs at least one time. .It Fl 72 [f2c,fpp] Text appearing after column 72 is an error. This option implies .Fl fixed for .Xr fpp 1 . .It Fl C [f2c] Bounds checking on arrays. .It Fl c Compile but do not link. .It Fl cd [f2c] Ignore DOUBLE COMPLEX intrinsic functions starting with cd. .It Fl DSYM [cpp, fpp] Define SYM to 1 during preprocessing of Fortran code. .It Fl DSYM=val [cpp, fpp] Define SYM to val during preprocessing of Fortran code. .It Fl E Preprocess only. .It Fl ext [f2c] Complain about Fortran 77 extensions. .It Fl f [f2c] Accept free form source. This option implies .Fl free for .Xr fpp 1 . .It Fl fixed [f2c,fpp] Text appearing after column 72 is an error. This option implies .Fl 72 for .Xr f2c 1 . .It Fl free [fpp] Accept free form source in the preprocessor. .It Fl h [f2c] Fortran 66 HOLLERITH. .It Fl hd [f2c] Fortran 66 HOLLERITH and align on double word boundary. .It Fl \&I2 [f2c] INTEGER and LOGICAL are treated as short int. .It Fl IDIR [cpp, fpp] Search DIRectory for included files. .It Fl i90 [f2c] Do not recognize the F90 bit-manipulation intrinsics. .It Fl kr [f2c] Use temporary variables to enforce Fortran evaluation. .It Fl krd [f2c] Use DOUBLE PRECISION temporary variables. .It Fl LDIR Search DIRectory for libraries. .It Fl lLIB Link with LIBrary. .It Fl macro={yes|no_com|no} [fpp] -macro option see .Xr fpp 1 .It Fl o Ar name Write output to .Ar name . .It Fl onetrip [f2c] See .Fl 1 above. .It Fl R [f2c] Do not promote REAL functions to DOUBLE PRECISION. .It Fl r [f2c] Cast values of REAL functions to REAL. .It Fl r8 [f2c] Promote REAL to DOUBLE PRECISION, COMPLEX to DOUBLE COMPLEX. .It Fl T Ar dir Use .Ar dir as a directory for temporary storage. .It Fl USYM [cpp, fpp] Undefine SYM during preprocessing of Fortran code. .It Fl undef [cpp, fpp] Undefine all previously defined symbols during preprocessing. .It Fl w [f2c, fpp] Suppress warnings. .It Fl w0 [fpp] Suppress warnings from preprocessing stage. .It Fl w66 [f2c] Suppress FORTRAN 66 warnings. .It Fl w8 [f2c] Suppress warnings when COMMON forces odd-word alignment. .It Fl V Echo the command line for each stage of compilation. .It Fl v [f2c, gcc] Verbose output. .It Fl z [f2c] No implicit double complex. .El .Sh BUGS Each stage of compilation is performed by .Nm forking a child process. The child process can produce one or more temporary files. If the parent process is killed before a child returns, then the temporary files may not be deleted. .Sh SEE ALSO .Xr cpp 1 , .Xr f2c 1 , .Xr fpp 1 , .Xr gcc 1 .Sh AUTHOR Steven G. Kargl, Applied Physics Laboratory, University of Washington