Oracle® Solaris Studio 12.4: Fortran User's Guide

Exit Print View

Updated: March 2015
 
 

3.2 Options Syntax

Typical compiler option formats are:

Table 3-1  Options Syntax
Syntax Format
Example
–flag
–g
–flagvalue
–Dnostep
–flag=value
–xunroll=4
–flag value
–o outfile

The following typographical conventions are used when describing the individual options:

Table 3-2  Typographic Notations for Options
Notation
Meaning
Example: Text/Instance
[ ]
Square brackets contain arguments that are optional.
-O[n]
-O4, -O
{ }
Curly brackets (braces) contain a set of choices for a required option.
-d{y|n}
-dy
|
The “pipe” or “bar” symbol separates arguments, only one of which may be chosen.
-B{dynamic|static}
-Bstatic
:
The colon, like the comma, is sometimes used to separate arguments.
-Rdir[:dir]
-R/local/libs:/U/a
The ellipsis indicates omission in a series.
-xinline=f1[,…fn]
-xinline=alpha,dos

Brackets, pipe, and ellipsis are meta-characters used in the descriptions of the options and are not part of the options themselves.

Some general guidelines for options are:

  • –lx is the option to link with library libx.a. It is always safer to put -lx after the list of file names to insure the order libraries are searched.

  • In general, processing of the compiler options is from left to right, allowing selective overriding of macro options (options that include other options). This rule does not apply to linker options. However, some options, -I, -L, and -R for example, accumulate values rather than override previous values when repeated on the same command line.

  • In an optional list of choices, such as -xhasc[={yes|no}], the first choice listed is the value assumed when the option flag appears on the command line without a value. For example, -xhasc is equivalent to -xhasc=yes.

  • Source files, object files, and libraries are compiled and linked in the order in which they appear on the command line.