User and Reference Guide for the Intel® C++ Compiler 14.0
Lets you specify a prefix that will be added to the names of gnu utilities called from the compiler.
Linux OS: | -gnu-prefix=prefix |
OS X: | None |
Windows OS: | None |
prefix |
Is a string that prepends the name of gnu tools called from the compiler. The value depends on the gnu toolchain used for a particular operating system. For example, for Wind River* Linux 5.x, the prefix value will be i686-wrs-linux-gnu-. You must append a hyphen to prefix only if the toolchain prefix ends with a hyphen. You can specify a short name or a pathname:
|
OFF |
The compiler calls gnu utilities by their short names, and looks for them in the path specified by the PATH environment variable. |
This option lets you specify a prefix that will be added to the names of gnu utilities called from the compiler. This option is available for Linux*-targeted compilers but the host may be either Windows* OS or Linux* OS.
If you specify option -gnu-prefix with option -gcc-name (or -gxx-name), the following occurs:
If a name specified in -gcc-name (or -gxx-name) contains a full path to a binary then option -gnu-prefix has no effect on the specified name; other binutils will have the prefix.
Otherwise, option -gnu-prefix is applied to the name specified in -gcc-name (or -gxx-name).
The above approach provides flexibility to specify an alternative gcc name outside of the default toolchain. At the same time, if a short name is provided in option -gcc-name, it is assumed to be a part of the default toolchain and a prefix will be added.
None
Consider that you are setting up the compiler to produce an application for a Wind River* Linux 5.
Assume that your gnu cross toolchain for the target OS is located in the following directory:
/wrl50/wrlinux-5/layers/wr-toolchain/4.6-60
and gnu utilities in the toolchain have prefix i686-wrs-linux-gnu-.
Assume your sysroot for the target OS is located in the following directory:
/wrl50/ia32/export/sysroot/wrl_intel-atom_glibc-std/bitbake_build/tmp/sysroots/intel-atom
To compile your application for Wind River* Linux 5, you must enter the following commands:
export PATH=/wrl50/wrlinux-5/layers/wr-toolchain/4.6-60/bin:PATH
icc –-sysroot=/wrl50/ia32/export/sysroot/wrl_intel-atom_glibc-std/bitbake_build/tmp/sysroots/intel-atom -gnu-prefix=i686-wrs-linux-gnu- app.c
The following examples show what happens when you specify both -gcc-name and -gnu-prefix.
Example 1:
Command line: -gcc-name=foobar –gnu-prefix=em64t-
Actual gcc name used in the compiler: em64t-foobar
ld name used in the icc: em64t-ld
Example 2:
Command line: -gcc-name=/a/b/foobar –gnu-prefix=em64t-
Actual gcc name used in the compiler: /a/b/foobar
ld name used in the icc: em64t-ld