-F

Category

Compiler customization

@PROCESS

None.

Purpose

Specifies an alternative configuration file, which stanza to use within the configuration file, or both.

The configuration file specifies different kinds of defaults, such as options for particular compilation steps and the locations of various files that the compiler requires.

Syntax

Read syntax diagramSkip visual syntax diagram
>>- -F--+-config_file--+-----------+-+-------------------------><
        |              '-:--stanza-' |   
        '-:--stanza------------------'   

Defaults

By default, the compiler uses the configuration file that is supplied at installation time, and the stanza defined in that file for the invocation command currently being used (for example, xlf2003, xlf90_r, xlf90, and so on.).

Parameters

config_file
The full path name of the alternate compiler configuration file to use.
stanza
The name of the configuration file stanza to use for compilation. This directs the compiler to use the entries under that stanza regardless of the invocation command being used. For example, if you are compiling with xlf2003, but you specify the xlf95 stanza, the compiler will use all the settings specified in the xlf95 stanza.

Usage

A simple way to customize the way the compiler works, as an alternative to writing complicated compilation scripts, is to add new stanzas to /opt/IBM/xlf/15.1.0/etc/xlf.cfg.nn ( where nn indicates the OS level), giving each stanza a different name and a different set of default compiler options. Or, you can specify a user-defined configuration file with the XLF_USR_CONFIG environment variable rather than editing the default configuration file. You may find a single, centralized file easier to maintain than many scattered compilation scripts and makefiles.

By running the compiler with an appropriate -F option, you can select the set of options that you want. You might have one set for full optimization, another set for full error checking, and so on. Note that the settings in any user-defined configuration file are processed before the ones specified by the -F option.

Restrictions

Because the default configuration file is replaced each time a new compiler release is installed, make sure to save a copy of any new stanzas or compiler options that you add.

Alternatively, you can store customized settings in the user-defined configuration file specified by the XLF_USR_CONFIG environment variable. This file will not be replaced during reinstallation.

Examples

 # Use stanza debug in default xlf.cfg.
   xlf95 -F:debug t.f

# Use stanza xlf95 in /home/fred/xlf.cfg.
   xlf95 -F/home/fred/xlf.cfg t.f

# Use stanza myxlf in /home/fred/xlf.cfg.
   xlf95 -F/home/fred/xlf.cfg:myxlf t.f

Related information