Overview: Porting Applications

This section describes a basic approach to porting applications from GCC's C/C++ compilers to the Intel® C/C++ compilers. These compilers correspond to each other in the following ways:

Language

Intel Compiler

GCC* Compiler

C

icc

gcc

C++

icpc

g++

It also contains information on how to use the -diag enable port-win option to issue warnings about general syntactical problems when porting from GNU gcc* to Microsoft C++.

Note iconNote

To simplify this discussion on porting applications, the term "gcc" , unless otherwise indicated, refers to both gcc and g++ compilers from the GNU Compiler Collection*.

Advantages to Using the Intel Compiler

In many cases, porting applications from gcc to the Intel compiler can be as easy as modifying your makefile to invoke the Intel compiler (icc) instead of gcc. Using the Intel compiler typically improves the performance of your application, especially for those that run on Intel processors. In many cases, your application's performance may also show improvement when running on non-Intel processors. When you compile your application with the Intel compiler, you have access to:

Since the Intel compiler is compatible and interoperable with gcc, porting your gcc application to the Intel compiler includes the benefits of binary compatibility. As a result, you should not have to re-build libraries from your gcc applications. The Intel compiler also supports many of the same compiler options, macros, and environment variables you already use in your gcc work.

Porting Strategy

For many gcc applications, porting to the Intel compiler requires little more than modifying your makefile to account for differences that may exist between compiling with gcc and compiling with icc.

One challenge in porting applications from one compiler to another is making sure there is support for the compiler options you use to build your application. The Compiler Options reference lists compiler options that are supported by both the Intel® C++ Compiler and gcc.

Next Steps

Optimization Notice

Intel® Compiler includes compiler options that optimize for instruction sets that are available in both Intel® and non-Intel microprocessors (for example SIMD instruction sets), but do not optimize equally for non-Intel microprocessors. In addition, certain compiler options for Intel® Compiler are reserved for Intel microprocessors. For a detailed description of these compiler options, including the instruction sets they implicate, please refer to "Intel® Compiler User and Reference Guides > Compiler Options". Many library routines that are part of Intel® Compiler are more highly optimized for Intel microprocessors than for other microprocessors. While the compilers and libraries in Intel® Compiler offer optimizations for both Intel and Intel-compatible microprocessors, depending on the options you select, your code and other factors, you likely will get extra performance on Intel microprocessors.

While the paragraph above describes the basic optimization approach for Intel® Compiler, with respect to Intel's compilers and associated libraries as a whole, Intel® Compiler may or may not optimize to the same degree for non-Intel microprocessors for optimizations that are not unique to Intel microprocessors. These optimizations include Intel® Streaming SIMD Extensions 2 (Intel® SSE2), Intel® Streaming SIMD Extensions 3 (Intel® SSE3), and Supplemental Streaming SIMD Extensions 3 (Intel® SSSE3) instruction sets and other optimizations. Intel does not guarantee the availability, functionality, or effectiveness of any optimization on microprocessors not manufactured by Intel. Microprocessor-dependent optimizations in this product are intended for use with Intel microprocessors.

Intel recommends that you evaluate other compilers to determine which best meet your requirements.


Submit feedback on this help topic

Copyright © 1996-2010, Intel Corporation. All rights reserved.