IBM Support

gxlc and gxlc++ utilities - Option mappings for XL C and XL C/C++ for Linux 13.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
-dumpversion -qversion
-E-E
-e-e

-fabi-version=n
-qabi_version=n
-fassociative-math -qstrict=noassociation
-fconserve-stack -qipa -qsmallstack
-fno-common-qnocommon
-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
-fgnu89-inline -Dinline=__inline__
-D__inline=__inline__
-qnokeyword=__inline

-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
-fPIC-qpic=large
-fpic-qpic=small

-frtti
-qrtti
-freciprocal-math -qfloat=hsflt
-fshort-enums-qenum=small
-fsigned-bitfields-qbitfields=signed
-fsigned-char-qchars=signed
-fstrict-aliasing-qalias=ansi
-fno-strict-aliasing-qalias=noansi
-fsyntax-only-qsyntaxonly
-fsigned-zeros -qstrict=zerosigns
-fno-signed-zeros -qstrict=nozerosigns

-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
-fvisibility=default -qvisibility=default
-fvisibility=hidden -qvisibility=hidden
-fvisibility=internal -qvisibility=internal
-fvisibility=protected -qvisibility=protected
-fwritable-strings-qnoro
-g-g
-g3-g
-ggdb-g
-gdwarf-g
-Idir-Idir
-include file-qinclude=file
-Ldir-Ldir
-lgcc-lgcc
-lxl
-llibrary-llibrary
-M-qmakedep=gcc
-MD-qmakedep=gcc
-MF *-MF *
-m32 -q32
-m64 -q64
-maltivec-qaltivec
-mcpu=970-qarch=ppc970
-mcpu=power-qarch=pwr
-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
-mno-fused-madd-qfloat=nomaf
-mfused-madd-qfloat=maf
-mlong-double-64-qnoldbl128
-mlong-double-128-qldbl128
-mminimal-toc-qminimaltoc
-mpower-qarch=pwr
-mpowerpc-qarch=ppc
-mpowerpc64-qarch=ppc64
-mtune=970-qtune=ppc970
-mtune=power-qtune=pwr
-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
-mxl-compat -qfloat=nogcclongdouble
-mno-xl-compat -qfloat=gcclongdouble
-mvsx -qaltivec
-nodefaultlibs-qnolib
-nostartfiles-qnocrt
-nostdinc-qnostdinc
-nostdlib-qnolib
-qnocrt
-O-O
-O0-qnoopt
-O1-O
-O2-O2
-O3-O3
-Os-O2
-qcompact
-Ofast -O5
-o-o
-P-qnoppline
-p-p
-pg-pg
-pthread -qthreaded
-D_REENTRANT
-lpthread
-R -R
-r-r
-S-S
-s-s
-shared-qmkshrobj
-shared-libgcc -qnostaticlink=libgcc
-static -qstaticlink
-static-libgcc -qstaticlink=libgcc

-std=c89
-F:c89

-std=iso9899:1990
-F:c89

-std=iso9899:199409
-F:c89

-std=c99
-Uinline
-U__inline
-F:c99

-std=c9x
-F:c99

-std=iso9899:1999
-F:c99

-std=iso9899:199x
-F:c99

-std=gnu89
-qlanglvl=extc89

-std=gnu99
-Uinline
-U__inline
-qlanglvl=extc99

-std=gnu9x
-qlanglvl=extc99

-std=gnu1x
-qlanglvl=extc1x

-std=gnu++98
-qlanglvl=extended:referencecollapsing
-T* -T*
-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
-Wuninitialized-qinfo=unset
-Wno-uninitialized -qinfo=nounset
-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

-Wno-reorder
-qsuppress=1540-5319
-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

Starting from XL C/C++ 12.1 for Linux, gxlc passes the -qlanglvl=referencecollapsing option to xlC by default for additional C++ compatibility.

Note: When you use gxlc or gxlc++ on SUSE Linux Enterprise Server 11 (SLES11) and Red Hat Enterprise Linux 6 (RHEL6), the source code is compiled in the 64-bit compiler mode. On a lower level operating system, the source code is compiled in the 32-bit compiler mode.

[{"Product":{"code":"SSXVZZ","label":"XL C\/C++ for Linux"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Documentation","Platform":[{"code":"PF016","label":"Linux"}],"Version":"13.1","Edition":"","Line of Business":{"code":"LOB57","label":"Power"}}]

Document Information

Modified date:
08 August 2018

UID

swg27039015