IBM Support

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

Product documentation


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.


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
-### -#

-B -B
-C -C
-c -c
-Dmacro[=defn] -Dmacro[=defn]
-dM -qshowmacros
-E -E
-e -e
-fdollars-in-identifiers -qdollar

-ffast-math -qignerrno
-ffixed-reg -qreserved_reg=registry_list


-ffunction-sections -qfuncsect


-finline-functions -qinline
-fkeep-inline-functions -qkeepinlines
-finline -qinline


-fpascal-strings -qmacpstr
-fPIC -qpic=large
-fpic -qpic=small

-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

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

-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
-O -O
-O0 -qnoopt
-O1 -O
-O2 -O2
-O3 -O3
-Os -O2
-o -o
-P -qnoppline
-p -p
-pg -pg
--param ssp-buffer-size=N -qstackprotect=size=N
-r -r
-S -S
-s -s
-shared -qmkshrobj












-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
-Wstack-protector -qinfo=stp
-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


Cross reference information
Segment Product Component Platform Version Edition
Software Development XL C/C++ for AIX Documentation AIX 11.1 All Editions

Document information

More support for: XL C/C++

Software version: 11.1

Operating system(s): AIX

Reference #: 7018016

Modified date: 2010-03-31