compiler.defaults

NAME
DESCRIPTION
USAGE
EXAMPLES
QUOTING
FILES
ENVIRONMENT
BUGS
SEE ALSO

NAME

compiler.defaults - Default options for the PathScale(TM) Compiler Suite

DESCRIPTION

This manual page describes the compiler.defaults (or simply “defaults”) file, which contains default options for the PathScale pathcc, pathCC, and pathf95 compilers.

The defaults file makes it possible to provide arguments to the compiler which it will treat as if they were passed to it on the command line. For example, you can use the defaults file to provide a set of additional include or library directories to search, or to specify some default compiler optimization flags.

USAGE

The format of the defaults file is simple. Each line can contain compiler options, separated by white space, followed by an optional comment. A comment begins with the "#" character, and ends at the end of a line. Empty lines and lines containing only comments are skipped.

Options are added to the command line in the order in which they appear in the defaults file. Every option is included unconditionally.

For exclusive options, the command line takes precedence over the defaults file. For example, if the defaults file contains the "-O3" option, but the compiler is invoked with "-O2" on the command line, it will behave as if invoked with "-O2" alone, because "-O2" and "-O3" are exclusive options.

For additive options, the command line is used before the defaults file. For example, if the defaults compile contains "-I/usr/foo" and the command line contains "-I/usr/bar", the compiler will behave as if invoked with "-I/usr/bar -I/usr/foo".

EXAMPLES

Here is an example defaults file:

# PathScale compiler defaults file.
#
# Set default CPU type to optimize for, since all of our
# systems use the same CPUs.
-march=opteron
# We have a recent Opteron CPU stepping, so it’s safe to
# always use SSE3.
-msse3
# Ensure that the FFTW library is available to users, so
# they don’t need to remember where it’s installed.
-L/share/fftw3/lib
-I/share/fftw3/include

QUOTING

The defaults file supports the backslash ("\") escape character and basic shell-like quoting. A backslash followed by a character translates into the character itself. Hence "\#" means "#", and "\\" means "\". Characters inside single quotes (’...’) are taken literally, including the backslash character. Characters inside double quotes ("...") are taken literally except for backslash escape sequences. For example, both of these specify the same search directory whose name contains spaces as well as the "#" and "\" characters:

-I’/foo # \bar’
-I"/foo # \\bar"

FILES

By default, the defaults file is searched for in the etc directory under the tree in which the PathScale compilers are installed. For example, if the compilers are installed in /opt/pathscale, they will attempt to open and read a defaults file named /opt/pathscale/etc/compiler.defaults.

ENVIRONMENT

The environment variable PSC_COMPILER_DEFAULTS_PATH, if it exists, should contain a colon-separated list of directories in which the compilers will search for a compiler.defaults file. The first defaults file to be found in this path is the only one that will be used.

If this environment variable is set, the compilers will not search the install directory for a defaults file.

BUGS

The defaults file has no conditional evaluation or substitution features, so it is not possible to, for example, specify architecture-specific options (such as library search paths) that will not be used in incompatible compilation modes. We recommend using the PSC_COMPILER_DEFAULTS_PATH environment variable to specify a different defaults file for different target architectures.

SEE ALSO

pathcc(1), pathCC(1), pathf95(1), eko(7), pathscale_intro(7)

Online documentation available at http://www.pathscale.com/docs.html