Fortran User's Guide

Commonly Used Options

The Sun Fortran compilers have many features that are selectable by optional command-line parameters. The short list below of commonly used options is a good place to start.          

Table 3-3 Commonly Used Options

Action 

Option 

   Details 

Debug--global program checking across routines for consistency of arguments, commons, and so on. 

 -Xlist

"-Xlist[x]"

Debug--produce additional symbol table information to enable the dbx and Sun WorkShop debugger.

 -g

"-g"

Performance--invoke the optimizer to produce faster running programs. 

-O[n]

"-O[n]"

 

Performance--produce efficient compilation and run times for the native platform, using a set of predetermined options 

 -fast

"-fast"

 

Bind as dynamic (or static) any library listed later in the command: -Bdynamic, -Bstatic

 -Bx

" -B{static|dynamic}"

Library--Allow or disallow dynamic libraries for the entire executable: -dy, -dn

 -dx

"-d{y|n}"

Compile only--Suppress linking; make a .o file for each source file.

 -c

"-c"

Output file--Name the executable output file nm instead of a.out.

 -o nm

"-o nm"

Profile--Profile by procedure for gprof.

 -pg

"-pg"