Developer Guide and Reference

Contents

gnu-prefix

Lets you specify a prefix that will be added to the names of gnu utilities called from the compiler.

Syntax

Linux:
-gnu-prefix
=
prefix
macOS:
None
Windows:
None
Arguments
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 6.x, the
prefix
value will be
x86_64-wrs-linux-
. 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:
  • short name:
    -gnu-prefix
    =
    prefix
    In this case, the compiler calls
    prefix<gnu_utility>
    instead of
    <gnu_utility>
    . The utility with this name should be in the PATH environment variable.
  • pathname:
    -gnu-prefix
    =
    /directory_name/
    prefix
    In this case, the compiler calls
    /directory_name/
    prefix<gnu_utility>
    . The utility with this name will be invoked by its full pathname.
Default
OFF
The compiler calls gnu utilities by their short names, and looks for them in the path specified by the PATH environment variable.
Description
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* or Linux*.
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.
Instead of using option
-gnu-prefix
, you can create symlinks for the short names of gnu utilities in the toolchain and add them to the PATH. For example,
ld--> i686-wrs-linux-gnu-ld
.
Even though this option is not supported for a Windows-to-Windows native compiler, it is supported for a Windows-host to Linux-target compiler.
Alternate Options
None
Consider that you are setting up the compiler to produce an application for a Wind River* Linux 6.
Assume that your gnu cross toolchain for the target operating system is located in the following directory:
/WRL/60/x86_64-linux/usr/bin/x86_64-wrs-linux
and gnu utilities in the toolchain have
prefix
x86_64-wrs-linux-
.
Assume your sysroot for the target operating system is located in the following directory:
/WRL/60/qemux86-64
To compile your application for Wind River* Linux 6, you must enter the following commands:
export PATH=/WRL/60/x86_64-linux/usr/bin/x86_64-wrs-linux:PATH icc --sysroot/WRL/60/qemux86-64 -gnu-prefix=x86_64-wrs-linux- 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

Product and Performance Information

1

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