HP Fortran Programmer's Guide (B3908-90031; September 2011)

Compiling and linking
Compiling with the f90 command
Chapter 224
where options is a list of one or more command-line options and files is a list of one or more files containing
HP Fortran source code to be compiled or object code to be linked. Items in options and files can be
interspersed on the command line, separated by spaces. However, some options are order-sensitive. For
example, the -l option, which is used to specify a library for linking, must follow the program file to which
it will be linked.
For information about using the -l option, see “Linking to nondefault libraries” on page 81. For more
information about the f90 command line, see HP Fortran Programmers Reference.
Command-line options
Command-line options enable you to override the default behavior of the f90 command. Some options
affect how files are compiled or linked; for example, the -O option requests optimization. Other options may
cause the f90 command to skip a process entirely; for example, the -c option compiles without linking.
And still others invoke processes other than the default ones; for example, the +cpp=yes option causes the
f90 command to send source files to the C preprocessor (cpp) before compiling. (For information about
using cpp, see “Using the C preprocessor” on page 92.)
Many options are of the form +[no]option, where +option enables the option’s functionality and
+nooption disables it. Other options have more than just an on or off state; these are of the 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 the following sub-options:
90 generate messages about non-FORTRAN 90 features
default no messages about nonstandard FORTRAN features
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 Programmers Reference.
For a brief descriptive list of the options, use the command line:
$ f90 +usage