Intel® System Studio 2014 for Linux* - Windows* hosted Builds

 Please see the Intel® System Studio Product Guide <install-dir>\System Studio 2014.0.xxx\Documentation\ embedded_compsupdoc_l.pdf for additional details not covered in this article.

1.1.1     Compiler Environment Setup

Use the Intel® C++ Compiler to compile your code.

Before you can use the compiler, you must first set the environment variables by running the compiler environment script iccvars.bat with an argument that specifies the target architecture.

The following procedure uses the iccvars.bat script:

  • Open a terminal session.
  • Run the compiler environment script iccvars.bat:

call <install-dir>\bin\iccvars.bat <arg>

where <install-dir> is the directory structure containing the compiler \bin directory, and <arg> is one of the following architecture arguments:

  • ia32: Compilers and libraries for IA-32 architectures
  • ia32_intel64: Compilers and libraries for Intel® 64 architectures

Use the –m64 option to change the default target from 32 to 64-bit compilation:

<install_dir>\bin\ia32 

-m64   Target 64 bits

Use the –m32 option to change the default target from 64 to 32-bit compilation:

<install_dir>\bin\intel64 

–m32  Target 32 bits

To invoke the Intel® C++ Compiler from the command line:

For a C source file (for example, my_source_file.c), use a command similar to the following:

icc.exe my_source_file.c

For a C++ source file (for example, my_source_file.cpp), use a command similar to the following:

icpc.exe my_source_file.cpp

1.1.2      Building Applications for Wind River* Linux* OS Target

Before compiling applications for running on the target Wind River* Linux* OS, you must install Wind River* Linux* 4.3/5.0.x and build sysroot for a target platform.

After installation is completed and sysroot is created, set two environment variables to match cross-compilation tools directories:

  • WRL_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 built sysroot for the target platform.

For example:

Wind River* Linux* 4.3 64-bit target

set WRL_TOOLCHAIN=<install-dir>\wrl43\wrlinux-4\layers\wrl-toolchain-4.4a-341\i586\toolchain\x86-win32

set WRL_SYSROOT=<install-dir>\wrl43\intel64\export\sysroot\common_pc_64-glibc_std\sysroot

Wind River* Linux 5.0.x 64-bit target

set WRL_TOOLCHAIN=<install-dir>\wrl50\wrlinux-5\layers\wr-toolchain\4.6-60-win32

set WRL_SYSROOT=<install-dir>\wrl50\intel64\export\sysroot\intel-xeon-core_glibc_std\bitbake_build\tmp\sysroots\intel-xeon-core

where <install-dir> is the path where toolchain and sysroot are installed, for example, C:\.

1.1.3      Giving Commands to the Compiler for Building Wind River* Linux*-Targeted Applications

Each time you compile for a Wind River* Linux* target, specify either -platform=wrl43 or -platform=wrl50 option depending on the target OS version.

To compile a C source file (for example, my_source_file.c) for Wind River* Linux* 5.0 target, use a command similar to the following:

icc.exe -platform=wrl50 my_source_file.c

To compile a C++ source file (for example, my_source_file.cpp) for Wind River* Linux* 5.0 target, use a command similar to the following:

icpc.exe -platform=wrl50 my_source_file.cpp

1.1.4      Building Applications for Tizen* Target

Before compiling applications for running on the Tizen* target,  install Tizen SDK (Software Development Kit).

After installation is completed, set PATH, TZN_SYSROOT and TZN_EXEC_PREFIX environment variables to match cross-compilation tools directories:

set PATH=”C:\tizen-sdk\tools\i386-linux-gnueabi-gcc-4.5\bin;%PATH%”

set TZN_SYSROOT=”C:\tizen-sdk\platforms\tizen2.0\rootstraps\tizen-emulator-2.0.cpp”

set TZN_EXEC_PREFIX=”i386-linux-gnueabi-”

1.1.5      Giving Commands to the Compiler for Building Tizen*-Targeted Applications

Each time you compile for Tizen* target, specify -gnu-prefix= and --sysroot= options.

To compile a C source file (for example, my_source_file.c) for Tizen* target, use a command similar to the following:

icc -gnu-prefix=%TZN_EXEC_PREFIX% --sysroot=%TZN_SYSROOT% my_source_file.c

For more complete information about compiler optimizations, see our Optimization Notice.