The Intel(R) C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology version 13.0 compiles C and C++ source files on Linux* OS systems. The compiler is supported on IA-32 and Intel® 64 architectures.
You must run the Intel C++ Compiler from the command line.
The default root installation path for the Compiler is/opt/intel/cc/13.0.1.xxxb/
for systems based on the IA-32 architecture and/opt/intel/cce/13.0.1.xxxb/
for systems based on the Intel(R) 64 architecture, wherexxx
represents a 3-digit build number. The term<install-dir>
is used in the documentation to refer to these default installation paths.
Optimization Notice |
---|
Intel's compilers 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 SSE2, SSE3, and 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. Certain optimizations not specific to Intel microarchitecture are reserved for Intel microprocessors. Please refer to the applicable product User and Reference Guides for more information regarding the specific instruction sets covered by this notice. Notice revision #20110804 |
Using the Compiler from the Command Line
You must "source" the compiler environment script,iccvars.sh
(oriccvars.csh
), to set the environment variables prior to invoking the compiler:
source /opt/intel/cc/12.0.xxxb/bin/iccvars.sh
To compile a C language source file (for example,my_source_file.c
), use the following command:
icc my_source_file.c
To compile C++ source files, use the following command:
icpc my_source_file.cpp
Following successful compilation, an executable nameda.out
is created in the current directory.
The Intel compiler also includes man pages. After sourcing the environment script, open the man page to view a complete list of compiler options:
man icc
You can read a summary of compiler options from the command line by invoking the compiler with the-help
option:
icc -help
Building Applications on a Linux* Operating System Host for the QNX* Neutrino* RTOS Target (IA-32 Architecture Only)
The Intel(R) C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a QNX* Neutrino* Real Time Operating System (RTOS).
QNX* Neutrino* RTOS is a 32-bit operating system; use the Intel® IA-32 architecture compiler for compilation.
Installation Information
Before compiling applications for running on the target QNX* Neutrino* RTOS, you must install the QNX* Momentics* Software Development Kit (SDK) 6.4.0 first.
Note
To avoid errors, install the QNX* Momentics* SDK to the suggested default directory, which is/opt/qnx640
.Giving Commands to the Compiler for Building QNX-Targeted Applications
Each time you compile for QNX target, specify-platform=qnx640
option. If you do not specify the-platform option, the compiler will build a Linux* operating system native application. If you do not specify theqnx640
argument, you will receive an error message.
To compile a C language source file (for example,my_source_file.c
) for QNX target, use a command similar to the following example:
icc -platform=qnx640 my_source_file.c
To compile a C++ source file (for example,my_source_file.cpp
) for QNX target, use a command similar to the following example:
icpc -platform=qnx640 my_source_file.cpp
Following successful compilation, an executable named a.out is created in the current directory. Copy a.out onto target machine running QNX* Neutrino* RTOS and verify that a.out runs on target machine.
Building Applications on a Linux* Operating System Host for the NetBSD* OS Target (IA-32 Architecture Only)
The Intel(R) C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a NetBSD* Operating System (OS).
This release supports NetBSD* on Intel® IA-32 architecture only; use the Intel® IA-32 architecture compiler for compilation.
Installation Information
Before compiling applications for running on the target NetBSD* OS, you must install cross-compilation tools and system image for NetBSD* 5.1.
For details go to http://www.netbsd.org/docs/guide/en/chap-build.html.
Example:
- Download sources of the OS (
gnusrc.tar, sharesrc.tar, src.tar, syssrc.tar, xsrc.ar
) and unpack them into a temporary directory<TEMP>
. - Compile cross-compilation tools from
<TEMP>/usr/src
directory:./build.sh -m i386 -T <NETBSD_TOOLS> tools
- Compile generic kernel:
./build.sh -m i386 -T <NETBSD_TOOLS> kernel=GENERIC
- Compile system image:
./build.sh -m i386 -T <NETBSD_TOOLS> -D <NETBSD_IMAGE> -U release
After tools and image are built, set 2 environment variables to match NetBSD tools and OS image directories:
export NETBSD_IMAGE=<NETBSD_IMAGE> export NETBSD_TOOLS=<NETBSD_TOOLS>
See the Release Notes for installation requirements details.
Giving Commands to the Compiler for Building NetBSD-Targeted Applications
Each time you compile for NetBSD* OS target, specify-platform=netbsd51
. If you do not specify the-platform option, the compiler will build a Linux* operating system native application. If you do not specify thenetbsd51
argument, you will receive an error message.
To compile a C language source file (for example, my_source_file.c
) for NetBSD* OS target, use a command similar to the following:
icc -platform=netbsd51 my_source_file.c
To compile a C++ source file (for example,my_source_file.cpp
) for NetBSD* OS target, use a command similar to the following:
icpc -platform=netbsd51 my_source_file.cpp
Following successful compilation, an executable nameda.out
is created in the current directory. Copya.out
onto target machine running NetBSD* OS and verify thata.out
runs on target machine.
Building Applications on a Linux* Operating System Host for the MontaVista* Linux* OS Target
The Intel(R) C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a MontaVista* Linux* Operating System (OS).
This release supports applications running in 32-bit mode only; use the Intel® IA-32 architecture compiler for compilation. Target MontaVista* Linux* OS architecture may be either IA-32 or Intel® 64 to allow for running Intel® IA-32 applications.
Installation Information
Before compiling applications for running on the target MontaVista* Linux* OS, you must install MontaVista* Linux* Carrier Grade Edition 5.x and obtain valid license.
For details, go to https://www.mvista.com/.
After installation is completed and licenses are configured, set environment variable to match cross-compilation tools directories:
export MVL_DEVKIT=/opt/montavista/cge/devkit/x86/em64t
Adjust the value of MVL_DEVKIT according to your installation directory, the value above assumes the default installation directory/opt/montavista/
for Carrier Grade Edition installation. The value also assumes that the target OS architecture isx86_em64t
, i.e. 32-bit applications are run on 64-bit OS.
See the Release Notes for installation requirements details.
Giving Commands to the Compiler for Building MontaVista* Linux*-Targeted Applications
Each time you compile for MontaVista* Linux* target, specify-platform=mvl50 option. If you do not specify the-platform option, the compiler will build a Linux* operating system native application. If you do not specify themvl50
argument, you will receive an error message.
To compile aC
language source file (for example,my_source_file.c
) for MontaVista* Linux* target, use a command similar to the following example:
icc -platform=mvl50 my_source_file.c
To compile aC++
source file (for example,my_source_file.cpp
) for MontaVista* Linux* target, use a command similar to the following example:
icpc -platform=mvl50 my_source_file.cpp
Following successful compilation, an executable nameda.out
is created in the current directory. Copya.out
onto target machine running MontaVista* Linux* OS and verify thata.out
runs on target machine.
Building Applications on a Linux* Operating System Host for the Wind River* Linux* OS Target
The Intel(R) C++ Compiler Standard Edition for Embedded Systems with Bi-Endian Technology compiles C and C++ applications on a Linux* OS system targeted for running on a Wind River* Linux* Operating System (OS).
Installation Information
Before compiling applications for running on the target Wind River* Linux* OS, you must install Wind River* Linux* 3.0.x and buildsysroot
for a target platform. For details on buildingsysroot
for a Wind River Linux, please refer to the Wind River Linux Getting Started document.
After installation is completed andsysroot
is created, set two environment variables to match cross-compilation tools directories:
WRL_SDK_TOOLCHAIN:
must contain the path to the directory inside the Wind River Linux installation tree where the toolchain for the target platform resides.WRL_SYSROOT:
must contain the path to the builtsysroot
for the target platform.
For example, if you built 32-bitsysroot
for acommon_pc
platform, please use the following values:
export WRL_SDK_TOOLCHAIN=/export/WRL/wrlinux-3.0/layers/wrll-toolchain-4.3-242/i586/toolchain/x86-linux2 export WRL_SYSROOT=/export/WRL-sysroot/common_pc_built/export/sysroot/common_pc-glibc_std
Adjust the value ofWRL_SDK_TOOLCHAIN
environment variable according to your Wind River Linux installation directory and target OS andWRL_SYSROOT
according to the path to a requiredsysroot
.
See the Release Notes for installation requirements details.
Giving Commands to the Compiler for Building Wind River* Linux*-Targeted Applications
Each time you compile for Wind River* Linux* target, specify-platform=wrl30 option. If you do not specify the-platform option, the compiler will build a Linux* operating system native application. If you do not specify thewrl30
argument, you will receive an error message.
To compile a language source file (for example,my_source_file.c
) for Wind River* Linux* target, use a command similar to the following example:
icc -platform=wrl30 my_source_file.c
To compile a C++ source file (for example,my_source_file.cpp
) for Wind River* Linux* target, use a command similar to the following example:
icpc -platform=wrl30 my_source_file.cpp
Following successful compilation, an executable nameda.out
is created in the current directory. Copya.out
onto target machine running Wind River* Linux* OS and verify thata.out
runs on target machine.