Solaris SPARC to Solaris x86 Porting Guide
The configure utility checks for the path of the build tools that to be used during the build, and
verifies that the tools worked in the path are specified in the PATH environment variable. The utility
configures the APR (Apache Portable Runtime) library used for implementing Apache-specific calls in
the native implementation of the OS platform.
The configure utility checks for various executables such as gcc and cc, along with the basic
options make, awk, ld, sed. It verifies the presence of different header files that would be used
during the compilation of the source code. These include header files for libraries implementing
threads, shared memory, processes, locking, and networking support (including IPv6). It reads all
environment variables that had been set. Finally, the utility creates Makefile for each module of
Apache Web Server.
2. make
This utility builds the various modules and components that form the Apache Web Server package.
The compilation process involve basic options for compiling, and platform-specific back-end
optimization options, as provided in the environment variable CFLAGS and LDFLAGS. During the
compilation process under the make tool, the following warnings are generated when using the
optimization flags:
cc: Warning: -xarch=native has been explicitly specified, or implicitly
specified by a macro option, -xarch=native on this architecture implies
-xarch=v8plusa, which generates code that does not run on pre
UltraSPARC processors
This warning occurs due to the option -fast, which expands to -xarch=native, and instructs
you to optimize the code for the native architecture. This flag is overridden by -xarch=v8plus to
generate the code for good performance on the SPARC architecture.
3. make install
This utility uses the option to install the Apache package in the path specified by the option --
prefix during the configure process. This option installs all the executables, libraries,
configuration files, documentation, and man pages in the specified path. When this final utility is
used, the Apache Web Server is installed successfully.
Differences in Compiler options used
The compiler flags used to compile the application on the SPARC platform were as follows:
• -xparallel—Macro equivalent to -xautopar, -xdepend, and -xexplicitpar. This
option is used to parallelize loops specified automatically by the compiler and explicitly by the
programmer. For a faster code, this option is used for a multiprocessor machine. If optimization
level is not at -xO3, it is raised to that level and a warning is issued.
• -fast—Macro that specifies a collection of options for optimizing the execution of applications.
This macro expands to:
-fns, -fsimple=2, -fsingle, -ftrap=%none, -xalias_level=basic, -
xarch=native, -xbuiltin=%all, -xdepend, -xlibmil, -xmemalign=8s, -xO5, -
xprefetch=auto, explicit -xtarget=ultra
The -fast option is used to specify the target system for instruction set and optimization. In this
case study, the machine used has value SUNW Ultra obtained by the command uname -i. The -
xtarget=ultra and -xarch=v8plus options are used to override these values in the -fast
macro.
• -xtarget=ultra—Option that specifies the target platform for instruction set optimization. Each
value of -xtarget expands into a specific set of values for the -xarch, -xchip, and -
xcache options. This option overrides the -target option used in the –fastoption. Based on
the target machine, this value is more suitable for enabling the compiler to generate code for good
performance on the UltraSPARC architecture.
When the value of -xtarget is set to ultra, then this option expands to:
-xarch=v8plusa -xchip=ultra -xcache=64/32/4:8192/512/2
23