IBM Support

gxlc and gxlc++ utilities - Option mappings for XL C and XL C/C++ for AIX, V10.1

Product Documentation


Abstract

XL C and XL C/C++ provides the gxlc and gxlc++ utilities to map many GCC compiler options to their XL C and XL C/C++ counterparts. Mappings currently recognized by XL C and XL C/C++ are listed in this document.

Content

The gxlc and gxlc++ utilities accept GNU C or C++ compiler options and translate them into comparable XL C or XL C/C++ options. Both utilities use the resulting XL C or XL C/C++ options to create an xlc or xlc++ invocation command, which they then use to invoke the compiler.

These utilities are provided to help you reuse make files created for applications previously developed with GNU C/C++. However, to fully exploit the capabilities of the compiler, we recommend that you use the standard XL C or XL C/C++ invocation commands and their associated options.

The actions of gxlc and gxlc++ are controlled by the gxlc.cfg configuration file. The GNU C/C++ options that have an XL C or XL C++ counterpart are shown in this file. Not every GNU option has a corresponding XL C or XL C/C++ option, and gxlc and gxlc++ will return warnings for input options that were not translated. You can modify the contents of the gxlc.cfg configuration file to meet your specific compilation requirements.

The gxlc and gxlc++ utilities will accept the following GNU C/C++ options and translate them to their corresponding XL C or XL C/C++ compiler options.








GCC optionMapping to xlc or xlc++ option
-###-#

-ansi
-qlanglvl=extc89
-qnokeyword=inline
-qnokeyword=typeof
-qnokeyword=asm
-qnocpluscmt
-D__STRICT_ANSI__
-B-B
-C-C
-c-c
-Dmacro[=defn]-Dmacro[=defn]
-dM-qshowmacros
-E-E
-e-e
-fdollars-in-identifiers-qdollar

-fexceptions
-qeh
-ffast-math-qignerrno
-qnostrict
-D__FAST_MATH__
-ffixed-reg-qreserved_reg=registry_list

-ffor-scope
-qlanglvl=ansifor

-fno-for-scope
-qlanglvl=noansifor
-ffunction-sections-qfuncsect

-fno-implicit-inline-templates
-qtmplinst=noinlines

-fno-implicit-templates
-qtmplinst=none
-finline-functions-qinline
-fkeep-inline-functions-qkeepinlines
-finline-qinline

-fno-gnu-keywords
-qnokeyword=typeof

-fno-operator-names
-qnokeyword=and
-qnokeyword=bitand
-qnokeyword=bitor
-qnokeyword=compl
-qnokeyword=not
-qnokeyword=or
-qnokeyword=xor
-fpascal-strings-qmacpstr
-fPIC-qpic=large
-fpic-qpic=small

-frtti
-qrtti
-fshort-enums-qenum=small
-fsigned-bitfields-qbitfields=signed
-fsigned-char-qchars=signed
-fstrict-aliasing-qalias=ansi
-fno-strict-aliasing-qalias=noansi
-fsyntax-only-qsyntaxonly

-ftemplate-depth-N
-qtemplatedepth=N
-ftls-model=model-qtls=model
-funroll-all-loops-qunroll=yes
-funroll-loops-qunroll=yes
-funsigned-bitfields-qbitfields=unsigned
-funsigned-char-qchars=unsigned

-fweak
-qweaksymbol
-fwritable-strings-qnoro
-g-g
-g3-g
-ggdb-g
-gxcoff-g
-Idir-Idir
-include file-qinclude=file
-Ldir-Ldir
-lgcc-lgcc
-llibrary-llibrary
-M-qmakedep=gcc
-MD-qmakedep=gcc
-MF *-MF *
-maix32-q32
-maix64-q64
-maltivec-qaltivec
-mcpu=403-qarch=403
-mcpu=601-qarch=601
-mcpu=602-qarch=602
-mcpu=603-qarch=603
-mcpu=604-qarch=604
-mcpu=970-qarch=ppc970
-mcpu=common-qarch=com
-mcpu=power-qarch=pwr
-mcpu=power2-qarch=pwr2
-mcpu=power3-qarch=pwr3
-mcpu=power4-qarch=pwr4
-mcpu=power5-qarch=pwr5
-mcpu=power6-qarch=pwr6
-mcpu=power6x-qarch=pwr6e
-mcpu=powerpc-qarch=ppc
-mcpu=powerpc64-qarch=ppc64
-mcpu=rs64a-qarch=rs64a
-mno-fused-madd-qfloat=nomaf
-mfused-madd-qfloat=maf
-mlong-double-64-qnoldbl128
-mlong-double-128-qldbl128
-mminimal-toc-qminimaltoc
-mpower-qarch=pwr
-mpower2-qarch=pwr2
-mpowerpc-qarch=ppc
-mpowerpc-gfxopt-qarch=pwrgr
-mpowerpc64-qarch=ppc64
-mtune=403-qtune=403
-mtune=601-qtune=601
-mtune=602-qtune=602
-mtune=603-qtune=603
-mtune=604-qtune=604
-mtune=970-qtune=ppc970
-mtune=common-qtune=com
-mtune=power-qtune=pwr
-mtune=power2-qtune=pwr2
-mtune=power3-qtune=pwr3
-mtune=power4-qtune=pwr4
-mtune=power5-qtune=pwr5
-mtune=power6-qtune=pwr6
-mtune=power6x-qtune=pwr6e
-mtune=powerpc-qtune=ppc
-mtune=powerpc64-qtune=ppc64
-mtune=rs64a-qtune=rs64a
-nodefaultlibs-qnolib
-nostartfiles-qnocrt
-nostdinc-qnostdinc
-nostdlib-qnolib
-qnocrt
-O-O
-O0-qnoopt
-O1-O
-O2-O2
-O3-O3
-Os-O2
-qcompact
-o-o
-P-qnoppline
-p-p
-pg-pg
-r-r
-S-S
-s-s
-shared-qmkshrobj

-std=c89
-F:c89

-std=iso9899:1990
-F:c89

-std=iso9899:199409
-F:c89

-std=c99
-F:c99

-std=c9x
-F:c99

-std=iso9899:1999
-F:c99

-std=iso9899:199x
-F:c99

-std=gnu89
-qlanglvl=extc89

-std=gnu99
-qlanglvl=extc99

-std=gnu9x
-qlanglvl=extc99

-std=c++98
-qlanglvl=strict98

-std=gnu++98
-qlanglvl=extended
-time-qphsinfo
-trigraphs-qtrigraph
-Umacro-Umacro
-u-u
--version-qversion
-Wformat-qformat
-Wformat-extra-args-qformat=exargs
-Wno-format-extra-args-qformat=noexargs
-Wformat-nonliteral-qformat=nlt
-Wno-format-nonliteral-qformat=nonlt
-Wformat-security-qformat=sec
-Wno-format-security-qformat=nosec
-Wformat-y2k-qformat=y2k
-Wno-format-y2k-qformat=noy2k
-Wuninitialized-qinfo=ini
-Wunreachable-code-qinfo=eff
-Wa,option-Wa,option
-Wl,option-Wl,option
-Wp,-MD,*-Wp,-qmakedep=gcc,-MF*
-Wp,option-Wp,option
-w-w
-Xassembler option-Wa,option
-Xlinker option-Wl,option
-x assembler-qsourcetype=assembler
-x assembler-with-cpp-qsourcetype=assembler-with-cpp
-x c-qsourcetype=c
-x c++-qsourcetype=c++
-x none-qsourcetype=default
-xassembler-qsourcetype=assembler
-xassembler-with-cpp-qsourcetype=assembler-with-cpp
-xc-qsourcetype=c
-xc++-qsourcetype=c++
-xnone-qsourcetype=default
-Z-Z

Original Publication Date

11 July 2008

[{"Product":{"code":"SSJT9L","label":"XL C\/C++"},"Business Unit":{"code":"BU054","label":"Systems w\/TPS"},"Component":"Documentation","Platform":[{"code":"PF002","label":"AIX"}],"Version":"10.1","Edition":"","Line of Business":{"code":"LOB08","label":"Cognitive Systems"}}]

Document Information

Modified date:
08 August 2018

UID

swg27011888