HP Fortran Programmer Guide (766160-001, March 2014)

form +option=arg. You can cause f90 to list the values for arg on stderr by specifying just
the option name without an argument. For example, given the command line:
$ f90 +langlvl= prog.f90
f90 will issue the following message:
f90: The '+langlvl=' option requires
one of
s
Still other options take a name as an argument. For example, the -oname option specifies the
name you want to give to the output file. If you misspell an option on the f90 command line, the
driver looks for options that are similar to the one you entered and lists them as possible alternatives
on stderr. It meanwhile compiles the program without the option in question.
For detailed information about the syntax of all the options, see the HP Fortran Programmer’s
Reference. For a brief descriptive list of the options, use the command line:
$ f90 +usage
Commonly-used options
Table 2-1 identifies commonly-used command-line options for when you want to change the
compiler’s default behavior. For a complete and full description of all HP Fortran command-line
options, see “Option descriptions” (page 21)
Table 7 Commonly-used options
FunctionOption
Compile without linking. Use this option to compile and
link in separate steps.
-c
Prepare program for debugging. Use this option to prepare
your program for debugging.
-g
Specify where to look for libraries; applies only to
succeeding -l options. Be careful about using this option
if the LPATH environment variable is set.
-Ldirectory
Specify a library. Use this option to link in library routines.-lx
Optimize. Use this option to optimize your program at the
default level of optimization.
-O
Give the SAVE attribute to local variables. Use this option
when porting older Fortran programs that may contain
uninitialized variables.
+save
Name the output file outfile. Use this option to name
the executable or object file.
-ooutfile
List all compile-line options currently supported by f90.+usage
Enable verbose mode. Use this option to get a report on
the compilation process.
-v
Set include file and module search path.-Idirectory
Specify that the arg has to be passed by a linker option.-Wl,arg
Command-line options by category
Table 2-2 categorizes the f90 command-line options. For detailed information about each of the
options, see “Option descriptions” (page 21).
20 Compiling and linking