Specifications

Red Hat Enterprise Linux to Oracle Solaris Porting Guide
34
TABLE 4-1. EQUIVALENT COMPILER FLAGS AND WORKAROUNDS
GCC 4.4.5 OPTIONS ORACLE SOLARIS STUDIO 12.3
OPTIONS
DESCRIPTION
files.
-nostdlib -xnolib Does not automatically link in any libraries.
-Os
-xspace
Performs only optimizations that do not increase the code size.
-pg -xpg Prepares the code to collect data for profiling with gprof.
-pthread -mt Passes -D_REENTRANT to the preprocessor and adds the
threads library to the link line.
-save-temps
-keeptmp
Retains temporary files.
-shared -G Causes the linker to create a shared object instead of an
executable. (Also use -Kpic with GCC and -xcode with Oracle
Solaris Studio.)
-static
-d[ y|n]
Specifies dynamic or static linking.
-std={ c99|c89} -xc99[=o] Controls recognition of features from the C99 standard.
TMPDIR ( environment
variable)
-xtemp=dir Sets the directory for temporary files. With GCC, set the
environment variable TMPDIR to the name of the directory you
want to use.
-trigraphs -xtrigraphs Determines whether the compiler recognizes trigraph sequences
as defined by the ISO C standard.
-v -V Prints information about the version of each tool as the compiler
executes.
--version -xlicinfo (obsolete) Returns version, copyright, and license information about the
compiler.
-w -erroff[=t] Disables printing specific warnings based on their tag number. In
GCC, -w inhibits all warnings.
-Wall -erroff Causes the compiler to perform more semantic checks and
enables lint-like tests. This can be achieved with GCC by using
the -Wall option and other -W options that are not included in
-Wall.
-Werror
-errwarn=t
Treats warnings as errors.
-Wstrict-prototypes -fd Warns about K&R-style function declarations and definitions.
-std=iso*
-X[ a | c | s | t]
Selects various degrees of compliance with ISO C.
-funroll-loops -
funroll-all-loops
-xunroll=n Instructs the compiler to unroll loops.