Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
32
TABLE 4-1. EQUIVALENT COMPILER FLAGS AND WORKAROUNDS
GCC 4.4.5 OPTIONS ORACLE SOLARIS STUDIO 12.3
OPTIONS
DESCRIPTION
(environment variable) -Yc specifies that the component c of the compiler can be found
in directory dir.
For GCC, the -B option specifies the directory but not the
component.
-B-Idir -YI, dir Changes the default directory that is searched for include files.
-
B
-Ldir
-YP,
dir Changes the default directory for finding library files.
-march=cputype -xchip[ =name] Selects the target processor.
-mcpu=i386
or
-march=i386
-x386 Optimizes for the 386 processor.
-mcpu=i486
or
-march=i486
-x486 Similar to -x386, but for the i486 processor.
-b machine -
march=cputype
-native
-xtarget=native
Directs the compiler to generate code for the current system
architecture.
-fPIC -xcode Emits position-independent code. In Oracle Solaris Studio,
-KPIC
is obsolete. Use
-xcode
instead.
-fsyntax-only -xe Performs syntax checks only.
-ftls-model=model -xthreadvar[ =o] Controls implementation of thread local variables.
-fno-inline
-xinline=no%function_name
Does not try to inline functions.
-finline-functions -xinline=%auto Attempts to inline all functions.
-floopoptimize -xdepend Analyzes loops for inter-iteration data dependencies.
GCC
-floopoptimize
performs loop optimizations.
-fno-builtin
(default behavior is to
optimize)
-xbuiltin Improves optimization of code that calls standard library
functions.
-ffixed-reg
-fcall-used-reg
-fcall-saved-reg
-xregs=r[ ,r. . .] Specifies the usage of registers for the generated code.
-ffast-math -fsimple=[ n] Allows the optimizer to make simplifying assumptions about
floating-point arithmetic.