構成ファイルは、呼び出された時にコンパイラーが使用する情報を指定します。XL Fortran は、インストール時にデフォルト構成ファイル /etc/xlf.cfg を提供します。
単独ユーザーのシステム上で実行している場合、またはコンパイル・スクリプトや makefiles を持つコンパイル環境をすでに持っている場合は、デフォルトの構成ファイルをそのままにしておくこともできます。
それ以外の場合、特に多数のユーザーにいくつかの一連のコンパイラー・オプションの中から選択できるようにさせたい場合は、次のように新しく命名したスタンザを構成ファイルに追加して、既存のコマンドにリンクする新規コマンドを作成することもできます。たとえば、以下と同様の方法で指定して、 xlf95 コマンドとのリンクを作成することができます。
ln -s /bin/xlf95 /home/lisa/bin/my_xlf95
他の名前でコンパイラーを実行すると、コンパイラーは対応するスタンザにリストされているオプション、ライブラリーなどを使用します。
注:
認識されないオプションのほとんどは、いずれの場合もリンカーに渡されますが、-W コンパイラー・オプションによってリンカーにオプションを渡すよりも、この属性を設定した方が便利です。
一般的な構成ファイルの例を以下に示します。
* Standard Fortran compiler xlf95: use = DEFLT libraries = -lxlf90,-lxlf,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qfree=f90 * Alias for standard Fortran compiler f95: use = DEFLT libraries = -lxlf90,-lxlf,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qfree=f90 fsuffix = f95 * Fortran 90 compiler xlf90: use = DEFLT libraries = -lxlf90,-lxlf,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90 * Alias for Fortran 90 compiler f90: use = DEFLT libraries = -lxlf90,-lxlf,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90 fsuffix = f90 * Original Fortran compiler xlf: use = DEFLT libraries = -lxlf90,-lxlf,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled 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,-lxlf,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled 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 = -lf,-lxlopt,-lxlf,-lxlomp_ser,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled 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 crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/lib/threads,-lxlf90_r,-lxlf,-lpthreads,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/lib/threads,-lxlf90_r,-lxlf,-lxlsmp, -lpthreads,-lm,-lc 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 crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/lib/threads,-lxlf90_r,-lxlf,-lpthreads,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/lib/threads,-lxlf90_r,-lxlf,-lxlsmp, -lpthreads,-lm,-lc options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90,-qthreaded * xlf95 with links to thread-safe components xlf95_r: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/lib/threads,-lxlf90_r,-lxlf,-lpthreads,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/lib/threads,-lxlf90_r,-lxlf,-lxlsmp, -lpthreads,-lm,-lc options = -qfree=f90,-qthreaded * xlf with links to thread-safe components (AIX POSIX Draft 7 Threads) xlf_r7: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/lib/threads,-lxlfpthrds_compat,-lxlf90_r, -lxlf,-lpthreads_compat,-lpthreads,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/lib/threads,-lxlfpthrds_compat, -lxlf90_r,-lxlf,-lxlsmp, -lpthreads_compat,-lpthreads,-lm,-lc options = -qthreaded,-qnozerosize,-qsave,-qalias=intptr, -qposition=appendold, -qxlf90=noautodealloc:nosignedzero, -qxlf77=intarg:intxor:persistent:noleadzero:gedit77: noblankpad:oldboz:softeof include_32 = -I/usr/lpp/xlf/include_32_d7 * xlf90 with links to thread-safe components (AIX POSIX Draft 7 Threads) xlf90_r7: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/lib/threads,-lxlfpthrds_compat,-lxlf90_r, -lxlf,-lpthreads_compat,-lpthreads,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/lib/threads,-lxlfpthrds_compat,-lxlf90_r,-lxlf, -lxlsmp,-lpthreads_compat,-lpthreads,-lm,-lc options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90,-qthreaded include_32 = -I/usr/lpp/xlf/include_32_d7 * xlf95 with links to thread-safe components (AIX POSIX Draft 7 Threads) xlf95_r7: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/lib/threads,-lxlfpthrds_compat,-lxlf90_r,-lxlf, -lpthreads_compat,-lpthreads,-lm,-lc proflibs = -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/lib/threads,-lxlfpthrds_compat,-lxlf90_r, -lxlf,-lxlsmp, -lpthreads_compat,-lpthreads,-lm,-lc options = -qfree=f90,-qthreaded include_32 = -I/usr/lpp/xlf/include_32_d7 * PE Fortran, with Fortran 95 behavior mpxlf95: use = DEFLT libraries = -L/usr/lpp/ppe.poe/lib,-L/usr/lpp/ppe.poe/lib/ip, -lmpi,-lvtd,-lxlf90,-lxlf,-lm,-lc proflibs = -L/usr/lpp/ppe.poe/lib/profiled,-L/lib/profiled, -L/usr/lib/profiled options = -qfree=f90,-binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include * PE Fortran, with Fortran 90 behavior mpxlf90: use = DEFLT libraries = -L/usr/lpp/ppe.poe/lib,-L/usr/lpp/ppe.poe/lib/ip,-lmpi, -lvtd,-lxlf90,-lxlf,-lm,-lc proflibs = -L/usr/lpp/ppe.poe/lib/profiled,-L/lib/profiled, -L/usr/lib/profiled options = -qxlf90=noautodealloc:nosignedzero,-qfree=f90, -binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include * PE Fortran, with FORTRAN 77 behavior mpxlf: use = DEFLT libraries = -L/usr/lpp/ppe.poe/lib,-L/usr/lpp/ppe.poe/lib/ip,-lmpi, -lvtd,-lxlf90,-lxlf,-lm,-lc proflibs = -L/usr/lpp/ppe.poe/lib/profiled,-L/lib/profiled, -L/usr/lib/profiled options = -qnozerosize,-qsave,-qalias=intptr,-qposition=appendold, -qxlf90=noautodealloc:nosignedzero, -qxlf77=intarg:intxor:persistent:noleadzero:gedit77 :noblankpad:oldboz:softeof,-binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include * PE Fortran, with Fortran 95 behavior, and links to thread-safe components mpxlf95_r: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip,-L/lib/threads, -lmpi_r,-lvtd_r,-lxlf90_r,-lxlf, -lpthreads,-lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a proflibs = -L/usr/lpp/ppe.poe/lib/profiled/threads, -L/usr/lpp/ppe.poe/lib/profiled, -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip, -L/lib/threads,-lmpi_r,-lvtd_r, -lxlf90_r,-lxlf,-lxlsmp,-lpthreads, -lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a options = -qthreaded,-qfree=f90,-binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include * PE Fortran, with Fortran 90 behavior, and links to thread-safe components mpxlf90_r: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip, -L/lib/threads,-lmpi_r,-lvtd_r, -lxlf90_r,-lxlf,-lpthreads,-lm_r, -lm,-lc_r,-lc, /usr/lpp/ppe.poe/lib/libc.a proflibs = -L/usr/lpp/ppe.poe/lib/profiled/threads, -L/usr/lpp/ppe.poe/lib/profiled, -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip, -L/lib/threads,-lmpi_r,-lvtd_r, -lxlf90_r,-lxlf,-lxlsmp,-lpthreads, -lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a options = -qxlf90=noautodealloc:nosignedzero, -qthreaded,-qfree=f90, -binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include * PE Fortran, with FORTRAN 77 behavior, and links to thread-safe components mpxlf_r: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip,-L/lib/threads, -lmpi_r,-lvtd_r,-lxlf90_r, -lxlf,-lpthreads,-lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a proflibs = -L/usr/lpp/ppe.poe/lib/profiled/threads, -L/usr/lpp/ppe.poe/lib/profiled, -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip, -L/lib/threads,-lmpi_r,-lvtd_r, -lxlf90_r,-lxlf,-lxlsmp,-lpthreads, -lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a options = -qthreaded,-qnozerosize,-qsave,-qalias=intptr, -qposition=appendold, -qxlf90=noautodealloc:nosignedzero, -qxlf77=intarg:intxor:persistent:noleadzero:gedit77 :noblankpad:oldboz:softeof,-binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include * mpxlf95_r, links to thread-safe components (AIX POSIX Draft 7 Threads) mpxlf95_r7: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip,-L/lib/threads,-lmpi_r, -lvtd_r,-lxlfpthrds_compat,-lxlf90_r,-lxlf, -lpthreads_compat, -lpthreads,-lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a proflibs = -L/usr/lpp/ppe.poe/lib/profiled/threads, -L/usr/lpp/ppe.poe/lib/profiled, -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip,-L/lib/threads, -lmpi_r,-lvtd_r, -lxlfpthrds_compat,-lxlf90_r,-lxlf,-lxlsmp, -lpthreads_compat, -lpthreads,-lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a options = -qthreaded,-qfree=f90,-binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include include_32 = -I/usr/lpp/xlf/include_32_d7 * mpxlf90_r, links to thread-safe components (AIX POSIX Draft 7 Threads) mpxlf90_r7: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip,-L/lib/threads,-lmpi_r, -lvtd_r,-lxlfpthrds_compat,-lxlf90_r,-lxlf, -lpthreads_compat, -lpthreads,-lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a proflibs = -L/usr/lpp/ppe.poe/lib/profiled/threads, -L/usr/lpp/ppe.poe/lib/profiled, -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip, -L/lib/threads,-lmpi_r,-lvtd_r, -lxlfpthrds_compat,-lxlf90_r,-lxlf,-lxlsmp, -lpthreads_compat, -lpthreads,-lm_r,-lm,-lc_r,-lc, /usr/lpp/ppe.poe/lib/libc.a options = -qxlf90=noautodealloc:nosignedzero,-qthreaded, -qfree=f90, -binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include include_32 = -I/usr/lpp/xlf/include_32_d7 * mpxlf_r, links to thread-safe components (AIX POSIX Draft 7 Threads) mpxlf_r7: use = DEFLT crt = /lib/crt0_r.o mcrt = /lib/mcrt0_r.o gcrt = /lib/gcrt0_r.o libraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip,-L/lib/threads, -lmpi_r,-lvtd_r, -lxlfpthrds_compat,-lxlf90_r,-lxlf, -lpthreads_compat, -lpthreads,-lm_r,-lm,-lc_r,-lc, /usr/lpp/ppe.poe/lib/libc.a proflibs = -L/usr/lpp/ppe.poe/lib/profiled/threads, -L/usr/lpp/ppe.poe/lib/profiled, -L/lib/profiled,-L/usr/lib/profiled smplibraries = -L/usr/lpp/ppe.poe/lib/threads, -L/usr/lpp/ppe.poe/lib, -L/usr/lpp/ppe.poe/lib/ip, -L/lib/threads,-lmpi_r,-lvtd_r, -lxlfpthrds_compat,-lxlf90_r,-lxlf,-lxlsmp, -lpthreads_compat, -lpthreads,-lm_r,-lm,-lc_r, -lc,/usr/lpp/ppe.poe/lib/libc.a options = -qthreaded,-qnozerosize,-qsave, -qalias=intptr,-qposition=appendold, -qxlf90=noautodealloc:nosignedzero, -qxlf77=intarg:intxor:persistent:noleadzero:gedit77 :noblankpad:oldboz:softeof,-binitfini:poe_remote_main include = -I/usr/lpp/ppe.poe/include include_32 = -I/usr/lpp/xlf/include_32_d7 * Common definitions DEFLT: xlf = /usr/lpp/xlf/bin/xlfentry crt = /lib/crt0.o mcrt = /lib/mcrt0.o gcrt = /lib/gcrt0.o crt_64 = /lib/crt0_64.o mcrt_64 = /lib/mcrt0_64.o gcrt_64 = /lib/gcrt0_64.o include_32 = -I/usr/lpp/xlf/include_32 include_64 = -I/usr/lpp/xlf/include_64 fppv = /usr/lpp/xlf/bin/fppv fppk = /usr/lpp/xlf/bin/fppk dis = /usr/lpp/xlf/bin/dis code = /usr/lpp/xlf/bin/xlfcode hot = /usr/lpp/xlf/bin/xlfhot ipa = /usr/lpp/xlf/bin/ipa bolt = /usr/lpp/xlf/bin/bolt as = /bin/as ld = /bin/ld cppoptions = -C options = -bh:4 defaultmsg = /usr/lpp/xlf/bin/default_msg
XL Fortran は、ライブラリー libxlf90_t.a に加えて、ライブラリー libxlf90_r.a も用意しています。ライブラリー libxlf90_r.a は、部分的スレッド・サポートの実行時ライブラリーである libxlf90_t.a のスーパーセットです。ファイル xlf.cfg は、xlf90_r、xlf90_r7、xlf95_r、xlf95_r7、xlf_r、および xlf_r7 コマンドの使用時に libxlf90_r.a に自動的にリンクするように設定されています。