The gxlc and gxlc++ utilities use the configuration file gxlc.cfg to translate GNU C and C++ options to XL C/C++ options. Each entry in gxlc.cfg describes how the utility should map a GNU C or C++ option to an XL C/C++ option and how to process it.
An entry consists of a string of flags for the processing instructions, a string for the GNU C option, and a string for the XL C/C++ option. The three fields must be separated by white space. If an entry contains only the first two fields and the XL C/C++ option string is omitted, the GNU C option in the second field will be recognized by gxlc and silently ignored.
The # character is used to insert comments in the configuration file. A comment can be placed on its own line, or at the end of an entry.
The following syntax is used for an entry in gxlc.cfg:
abcd "gcc_or_g++_option" "xlc_or_xlc++_option"
where:
ynn* "-finline" "-qinline"If given -fno-inline, then gxlc will translate it to -qnoinline.
nyn* "-fmyvalue" "-qmyvalue"gxlc and gxlc++ will then expect a value for these options.
nni* "-I-"If gxlc and gxlc++ encounters this option as input, it will not process it and will generate a warning.
nnn* "-fwritable-strings" "-qnoro"
It is possible to create an entry that will map a range of options. This is accomplished by using the asterisk (*) as a wildcard. For example, the gcc -D option requires a user-defined name and can take an optional value. It is possible to have the following series of options:
-DCOUNT1=100 -DCOUNT2=200 -DCOUNT3=300 -DCOUNT4=400
Instead of creating an entry for each version of this option, the single entry is:
nnn* "-D*" "-D*"
where the asterisk will be replaced by any string following the -D option.
Conversely, you can use the asterisk to exclude a range of options. For example, if you want gxlc or gxlc++ to ignore all the -std options, then the entry would be:
nni* "-std*"
When the asterisk is used in an option definition, option flags a and b are not applicable to these entries.
The character % is used with a GNU C or GNU C++ option to signify that the option has associated parameters. This is used to insure that gxlc or gxlc++ will ignore the parameters associated with an option that is ignored. For example, the -isystem option is not supported and uses a parameter. Both must be ignored by the application. In this case, the entry is:
nni* "-isystem %"
For a complete list of GNU C and C++ and XL C/C++ option mapping, refer to:
Related information