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 -onameoption 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

Option

Function

 

 

-c

Compile without linking. Use this option to compile and

 

link in separate steps.

 

 

-g

Prepare program for debugging. Use this option to prepare

 

your program for debugging.

 

 

-Ldirectory

Specify where to look for libraries; applies only to

 

succeeding -loptions. Be careful about using this option

 

if the LPATH environment variable is set.

 

 

-lx

Specify a library. Use this option to link in library routines.

 

 

-O

Optimize. Use this option to optimize your program at the

 

default level of optimization.

 

 

+save

Give the SAVE attribute to local variables. Use this option

 

when porting older Fortran programs that may contain

 

uninitialized variables.

 

 

-ooutfile

Name the output file outfile. Use this option to name

 

the executable or object file.

 

 

+usage

List all compile-line options currently supported by f90.

 

 

-v

Enable verbose mode. Use this option to get a report on

 

the compilation process.

 

 

-Idirectory

Set include file and module search path.

 

 

-Wl,arg

Specify that the arg has to be passed by a linker option.

 

 

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