Solaris SPARC to Solaris x86 Porting Guide

functions carried out by the
-x02 option.
xO4: Performs loop
unrolling, avoids creating
stack frames when
possible, and automatically
inlines functions contained
in the same file, on top of
the functions carried out by
-xO3.
xO5: Generates the highest
level of optimization.
-xtarget
This option specifies the
target system for instruction
set and optimization.
The values are:
native
native64
generic
generic64
<<platform-name>>
The values are:
native
generic
386
486
pentium
pentium_pro
Key: (C) denotes compiler option used by cc (C compiler). (C++) denotes compiler option used by CC
(C++ compiler). Otherwise the option is valid for both cc and CC (C and C++ compilers).
Using Solaris developer tools
To build software on the Solaris OS, you must install the tools you need on your development
machine. Whether you want to use the standard tools that are bundled in Solaris OS, or use the add-
on tools Sun Studio IDE and NetBeans IDE, you must first install the appropriate Solaris software for a
developer environment.
When you install the Solaris OS, you must select one of the following software groups, which contain
the developer packages:
Developer
Entire
Entire Plus OEM
With these software groups, you receive compilers such as the GNUC compiler (gcc) and the Java
compiler (javac). GNU source-level debugger (gdb) and the Modular Debugger (mdb), a linker (ld),
source control utilities (sccs), and build utilities (such as make)are also installed. The files are installed
in /usr/css and /usr/sfw.
Kernel-Level debugging
The Modular Debugger mdb is an extensible, general purpose debugging tool for the Solaris OS. The
Solaris Modular Debugger mdb(1) command to debug complex is explained in the
Sun website.
Using the Sun StudioTools
The Sun Studio software provides modules for creating, editing, building, debugging, and analyzing
the performance of a C, C++, or Fortran application. Many Sun Studio tools have both a GUI and
command-line equivalent. Those tools with GUIs provide online help. For the command-line versions,
use the associated man pages.
The Sun Studio software includes the following tools:
Sun Studio IDE—An integrated development environment that provides access to the Sun Studio
tools. In addition to C, C++, and Fortran tools, the IDE includes a set of basic Java language
support modules.
Sun Studio C compiler—Includes a C compiler, incremental link editor, and lint program.
Sun Studio C++ compiler—Includes a full-featured C++ compiler and interval arithmetic library.
16