gxlc and gxlc++ utilities - Option mappings for XL C and XL C/C++ for
Document
AIX, V12.1
information
XL C/C++ for AIX
Documentation
Software version:
12.1
Operating system(s):
Product documentation
AIX
Reference #:
Abstract
7022984
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
Modified date:
currently recognized by XL C and XL C/C++ are listed in this document.
2012-05-08
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 option
Mapping to xlc or xlc++ option
-###
-#

-###
-#
-qlanglvl=extc89
-ansi
-qnokeyword=inline
-qnokeyword=typeof
-qnokeyword=asm
-qnocpluscmt
-D__STRICT_ANSI__
-qlanglvl=strict98
-ansi
-B
-B
-C
-C
-c
-c
-Dmacro[=defn]
-Dmacro[=defn]
-dM
-qshowmacros
-E
-E
-e
-e
-fdollars-in-identifiers
-qdollar
-qeh
-fexceptions
-ffast-math
-qignerrno
-qnostrict
-D__FAST_MATH__
-ffixed-reg
-qreserved_reg=registry_list
-qlanglvl=ansifor
-ffor-scope
-qlanglvl=noansifor
-fno-for-scope
-ffunction-sections
-qfuncsect
-qtmplinst=noinlines
-fno-implicit-inline-templates
-qtmplinst=none
-fno-implicit-templates
-finline-functions
-qinline
-fkeep-inline-functions
-qkeepinlines
-finline
-qinline
-qnokeyword=typeof
-fno-gnu-keywords
-qnokeyword=and
-fno-operator-names
-qnokeyword=bitand
-qnokeyword=bitor
-qnokeyword=compl
-qnokeyword=not
-qnokeyword=or
-qnokeyword=xor
-fpascal-strings
-qmacpstr
-fPIC
-qpic=large
-fpic
-qpic=small

-qrtti
-frtti
-fshort-enums
-qenum=small
-fsigned-bitfields
-qbitfields=signed
-fsigned-char
-qchars=signed
-fstack-protector
-qstackprotect
-fstack-protector-all
-qstackprotect=all
-fstrict-aliasing
-qalias=ansi
-fno-strict-aliasing
-qalias=noansi
-fsyntax-only
-qsyntaxonly
-qtemplatedepth=N
-ftemplate-depth-N
-ftls-model=model
-qtls=model
-funroll-all-loops
-qunroll=yes
-funroll-loops
-qunroll=yes
-funsigned-bitfields
-qbitfields=unsigned
-funsigned-char
-qchars=unsigned
-qweaksymbol
-fweak
-fwritable-strings
-qnoro
-g
-g
-g3
-g
-ggdb
-g
-gdwarf
-g
-qdbgfmt=dwarf
-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=power7
-qarch=pwr7
-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=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=power7
-qtune=pwr7
-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
--param ssp-buffer-size=N
-qstackprotect=size=N
-r
-r
-S
-S
-s
-s
-shared
-qmkshrobj
-F:c89
-std=c89
-F:c89
-std=iso9899:1990
-F:c89
-std=iso9899:199409
-F:c99
-std=c99
-F:c99
-std=c9x
-F:c99
-std=iso9899:1999
-F:c99
-std=iso9899:199x
-qlanglvl=extc89
-std=gnu89
-qlanglvl=extc99
-std=gnu99
-qlanglvl=extc99
-std=gnu9x
-qlanglvl=extc1x
-std=gnu1x
-qlanglvl=strict98
-std=c++98
-
-std=gnu++98
qlanglvl=extended:referencecollapsing
-time
-qphsinfo
-trigraphs
-qtrigraph
-Umacro
-Umacro
-u
-u
--version
-qversion
-Wformat
-qformat
-Wformat=2
-qformat=ALL:nonlt
-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
-Wstack-protector
-qinfo=stp
-Wuninitialized
-qinfo=ini
-Wno-uninitialized
-qinfo=noini
-Wunreachable-code
-qinfo=eff
-Wno-unreachable-code
-qinfo=noeff
-Wunused-parameter
-qinfo=par
-Wno-unused-parameter
-qinfo=nopar
-Wunused-variable
-qinfo=use
-Wno-unused-variable
-qinfo=nouse
-Wstack-protector
-qinfo=stp
-Wno-stack-protector
-qinfo=nostp
-Wfatal-errors
-qmaxerr=1:e
-qsuppress=1540-5319
-Wno-reorder
-Wno-div-by-zero
-qsuppress=1506-232:1540-1800
-Wendif-labels
-qlanglvl=notextafterendif
-Wno-endif-labels
-qlanglvl=textafterendif
-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

Starting from XL C/C++ V12.1 for AIX, gxlc passes the -
qlanglvl=referencecollapsing option to xlC by default for additional C++
compatibility.
Original publication date
2012/5/8
Copyright and trademark information
IBM, the IBM logo and ibm.com are trademarks of International Business
Machines Corp., registered in many jurisdictions worldwide. Other product and
service names might be trademarks of IBM or other companies. A current list
of IBM trademarks is available on the Web at "Copyright and trademark
information" at www.ibm.com/legal/copytrade.shtml.