The configuration file specifies information that the compiler uses when you invoke it. XL Fortran provides the default configuration file /etc/opt/ibmcmp/xlf/8.1/xlf.cfg at installation time.
If you are running on a single-user system, or if you already have a compilation environment with compilation scripts or makefiles, you may want to leave the default configuration file as it is.
Otherwise, especially if you want many users to be able to choose among several sets of compiler options, you may want to add new named stanzas to the configuration file and to create new commands that are links to existing commands. For example, you could specify something similar to the following to create a link to the xlf95 command:
ln -s /opt/ibmcmp/xlf/8.1/bin/xlf95 /Users/lisa/bin/my_xlf95
When you run the compiler under another name, it uses whatever options, libraries, and so on, that are listed in the corresponding stanza.
Notes:
The configuration file contains the following attributes:
You may find it more convenient to set up this attribute than to pass options to the linker through the -W compiler option. However, most unrecognized options are passed to the linker anyway.
The following is an example of a configuration file:
xlf95: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qfree=f90
* Alias for standard Fortran compiler
f95: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qfree=f90
fsuffix = f95
* Fortran 90 compiler
xlf90: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90
* Alias for Fortran 90 compiler
f90: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90
fsuffix = f90
* Original Fortran compiler
xlf: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qnozerosize,-qsave,-qalias=intptr,-qposition=appendold,
-qxlf90=noautodealloc:nosignedzero,-qxlf77=intarg:intxor
:persistent:noleadzero:gedit77:noblankpad:oldboz:softeof
* Alias for original Fortran compiler
f77: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qnozerosize,-qsave,-qalias=intptr,-qposition=appendold,
-qxlf90=noautodealloc:nosignedzero,-qxlf77=intarg:intxor
:persistent:noleadzero:gedit77:noblankpad:oldboz:softeof
* Alias for original Fortran compiler, used for XPG4 compliance
fort77: use = DEFLT
libraries = -lxlf90,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
gcc_libs = -lm,-lc,-lgcc,-lSystem
options = -qnozerosize,-qsave,-qalias=intptr,-qposition=appendold,
-qxlf90=noautodealloc:nosignedzero,-qxlf77=intarg:intxor
:persistent:noleadzero:gedit77:noblankpad:oldboz:softeof
* xlf with links to thread-safe components
xlf_r: use = DEFLT
libraries = -lxlf90_r,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
smplibraries = -lxlf90_r,-lxlopt,-lxlsmp,-lxl,-lxlfmath
gcc_libs = -lpthread,-lm,-lc,-lgcc,-lSystem
options = -qthreaded,-qnozerosize,-qsave,-qalias=intptr,
-qposition=appendold,-qxlf90=noautodealloc:nosignedzero,
-qxlf77=intarg:intxor:persistent:noleadzero:gedit77
:noblankpad:oldboz:softeof
* xlf90 with links to thread-safe components
xlf90_r: use = DEFLT
libraries = -lxlf90_r,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
smplibraries = -lxlf90_r,-lxlopt,-lxlsmp,-lxl,-lxlfmath
gcc_libs = -lpthread,-lm,-lc,-lgcc,-lSystem
options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90,-qthreaded
* xlf95 with links to thread-safe components
xlf95_r: use = DEFLT
libraries = -lxlf90_r,-lxlopt,-lxlomp_ser,-lxl,-lxlfmath
smplibraries = -lxlf90_r,-lxlopt,-lxlsmp,-lxl,-lxlfmath
gcc_libs = -lpthread,-lm,-lc,-lgcc,-lSystem
options = -qfree=f90,-qthreaded
* Common definitions
DEFLT: xlf = /opt/ibmcmp/xlf/8.1/exe/xlfentry
crt = /usr/lib/crt1.o
mcrt = /usr/lib/gcrt1.o
gcrt = /usr/lib/gcrt1.o
include_32 = -I/opt/ibmcmp/xlf/8.1/include
dis = /opt/ibmcmp/xlf/8.1/exe/dis
code = /opt/ibmcmp/xlf/8.1/exe/xlfcode
hot = /opt/ibmcmp/xlf/8.1/exe/xlfhot
ipa = /opt/ibmcmp/xlf/8.1/exe/ipa
bolt = /opt/ibmcmp/xlf/8.1/exe/bolt
defaultmsg = /opt/ibmcmp/xlf/8.1/msg/en_US
as = /usr/bin/as
ld = /usr/bin/ld
cppoptions = -C
cpp = /opt/ibmcmp/xlf/8.1/exe/cpp
dynlib = -dynamic
libdirs = -L/opt/ibmcmp/xlsmp/1.3/lib,-L/opt
/ibmcmp/xlf/8.1/lib,-L/opt/ibmcmp/xlsmp
/1.3/../../lib,-L/opt/ibmcmp/xlf/8.1/../../lib
gcc_path = /usr
gcc_libdirs = -L/usr/lib/gcc/darwin/3.3,-L/usr/lib/gcc/darwin,-
L/usr/libexec/gcc/darwin/ppc/3.3/../../..
options =
modes_configure = 32
XL Fortran provides the library libxlf90_r.dylib in addition to libxlf90_t.dylib. The library libxlf90_r.dylib is a superset of libxlf90_t.dylib, which is a partial thread-support run-time library. The file xlf.cfg has been set up to link to libxlf90_r.dylib automatically when you use the xlf90_r, xlf95_r, and xlf_r commands.
