Good new! The more focused community about XL compilers on POWER is now available at http://ibm.biz/xl-power-compilers.
If you are interested in the XL compilers on POWER, you may want to join the new community and subscribe to updates there. See you there!
This site remains the Cafe for C/C++ compilers for IBM Z.
One of the challenges our customers have often reported over the years is how to migrate applications from GCC or other C++ compilers to the XL C/C++ compiler for AIX or Linux on POWER. The XL compilers have their own extensive set of compiler options, and on AIX and Linux on POWER Big Endian (LoP BE) these options are completely different from GCC options. The good news is that our new XL C/C++ compiler for Linux on Power Little Endian (LoP LE) supports both legacy XL compiler options and a wide range of GCC options.
XL C/C++ for LoP LE supports two option categories:
· XL Legacy options: these options are a subset of existing XL options on other platforms such as AIX and LoP BE. If you are already building your applications with XL C/C++ on AIX or LoP BE, you can continue to use the same compiler options to seamlessly migrate your software to the new POWER8 little Endian Linux platform and hardware.
· GCC options: these options are a subset of GCC options. If you currently build your applications using GCC on either an IBM platform or an OEM platform such as Intel x86, you can easily migrate to XL C/C++ LoP LE with minimal changes to your make files (or build mechanisms in general). The XL C/C++ compiler for LoP LE supports GCC options in the original form that GCC does.
XL C/C++ on AIX and LoP BE also provide a stanza called gxlc, which supports a subset of GCC options. XL C/C++ for LoP LE does not provide the gxlc stanza because the much broader set of GCC options already supported by the compiler make gxlc unnecessary. The subset of GCC options that XL C/C++ for LoP LE does not support are mostly either GCC platform dependent options or some GCC optimization options that are specific to GCC's backend. XL C/C++ has its own set of options used to direct compiler optimizations and code generation. The range of optimizations provided by XL, as well as the degree of control you have through optimization options, is much more extensive than what GCC provides.
Here are some points to keep in mind, when using compiler options:
· XL C/C++ for LoP LE supports combining the XL Legacy and GCC options and passing them in an invocation. However, IBM does not recommend mixing and matching these two option categories. It is better to stick to one of these categories whenever possible, and to mix the two categories only when one category is missing an option that exists in the other category. Note that certain options from the two categories cannot be combined (the documentation explains which options are incompatible). For example, the XL Legacy option "-+" cannot coexist with the GCC option "-x".
· When an option from either of the categories is not supported, XL C/C++ will issue a message. The message is a warning (versus an error) by default, to maintain compatibility with the XL compiler on other platforms. You can switch these warnings to errors with the "-Werror=unused-command-line-argument" option.
· The XL legacy options do not cover all the XL options available on other platforms. Options that are not relevant to the LE platform are not supported. Other options are deprecated, because they have equivalent GCC options that can be used instead. Others will continue to be supported in future XL compiler releases. Similarly, not all the GCC options are supported and some of these unsupported options will be supported in the future.
· XL legacy options that are equivalent to existing GCC options but that do not support the same range of suboptions as GCC will not be extended in future compiler releases to support the same suboptions as the GCC option. They are supported as they were in their original form. For example, the XL Legacy option "-qarch" supports the "auto" suboption, while the equivalent GCC option "-mcpu" does not. XL compiler will not extend "-mcpu" to support the "auto" suboption.
With the significant improvements to GCC option compatibility in the XL C/C++ compiler for Linux on POWER Little Endian, you can have the best of both worlds. If you are migrating from GCC on any platform to XLC on LoP LE, you can take advantage of the industry leading optimization technology in XL compilers and get better runtime performance. If you are migrating from AIX or Linux on POWER Big Endian and already use XL, you can continue to benefit from XL optimization technology using the options you are already used to.