The Intel® C++ Compiler options that affect gcc* interoperability include:
The -gcc-name=name option, used with -cxxlib-gcc, lets you specify the location of gcc if the compiler cannot locate the gcc C++ libraries. Use this option when referencing a non-standard gcc installation.
The -gcc-version=nnn option provides compatible behavior with gcc, where nnn indicates the gcc version. The -gcc-version option is ON by default, and the value of nnn depends on the version of gcc installed on your system. This option selects the version of gcc with which you achieve ABI interoperability.
|Installed Version of gcc||Default Value of -gcc-version|
|older than version 3.2||not set|
The -cxxlib-gcc[=GCC-root-dir] option lets you to build your applications using the C++ libraries and header files included with the gcc compiler. They include:
Use the optional argument, =GCC-root-dir, to specify the top-level location for the gcc binaries and libraries.
The Intel C++ Compiler is compatible with gcc 3.2, 3.3, and 3.4. The -cxxlib-gcc option is ON by default if you are using gcc 3.2, 3.3, or 3.4.
When you compile and link your application using the -cxxlib-gcc option, the resulting C++ object files and libraries can interoperate with C++ object files and libraries generated by gcc 3.2. This means that third-party C++ libraries built with gcc 3.2 will work with C++ code generated by the Intel Compiler.
The -cxxlib-gcc option can only be used on Linux distributions that include gcc 3.2. This is required for C++ ABI conformance.
By default, the Intel C++ Compiler uses headers and libraries included with the product. If you are linking with code compiled with g++, which was compiled against gnu C++ headers, then differences in the headers might cause incompatibilities that result in run-time errors.
If you build one shared library against the Intel C++ libraries, build a second shared library against the gnu C++ libraries, and use both libraries in a single application, you will have two C++ run-time libraries in use. Since the application might use symbols from both libraries, the following problems may occur:
The Intel C++ Compiler does not support more than one run-time library in one application.
If you successfully compile your application using more than one run-time library, the resulting program will likely be very unstable, especially when new code is linked against the shared libraries.
You should use the -cxxlib-gcc option if your application includes source files generated by g++ and source files generated by the Intel C++ Compiler. This option directs the Intel compiler to use the g++ header and library files to build one set of run-time libraries. As a result, your program should run correctly.
The -cxxlib-icc option directs the Intel compiler to use the C++ run-time libraries and C++ header files included with the Intel compiler. They include:
The -cxxlib-icc option is ON by default if are using a gcc version less than 3.2.
The -fabi-version=n option directs the compiler to select a specific ABI implementation. By default, the Intel compiler uses the ABI implementation that corresponds to the installed version of gcc. Both gcc 3.2 and 3.3 are not fully ABI-compliant.
|Value of n||Description|
|n=0||Select most recent ABI implementation|
|n=1||Select g++ 3.2 compatible ABI implementation|
|n=2||Select most conformant ABI implementation|
See http://www.codesourcerey.com for more information on ABI conformance.
See Specifying Alternate Tools and Paths for information on using -Qlocation to specify the location of the GNU assembler and linker.