Arch specific notes — SPARC
The SPARC port uses the sparc
keyword. It focuses on sun4u
hardware (Sun UltraSparc systems with v9
CPUs). v8
processors
and 2.4 kernels should still work with Gentoo, but they are no longer supported
by the Gentoo/SPARC team.
SPARC systems are notoriously strict on aligned access: this is the most common
type of bug seen on SPARC (other than big-endian related issues), causing a
SIGBUS
signal to be sent to the errant process. Known issues should be
linked to
the related tracker bug.
This is usually due to supposedly clever pointer casts and type punning tricks by the code authors.
SPARC kernel and userland ABIs
v9
systems use a pure 64 bit kernel and a pure 32 bit userland. This can
cause portability problems when working with low level software if the kernel
does not provide working 32 bit compatibility interfaces.
v8
systems use a pure 32 bit kernel and a pure 32 bit userland.
All of the above SPARC systems are big endian, nevertheless the v9
architecture also utilizes little-endian instructions to access data on PCI
buses.
Additional SPARC keywording requirements
For a package to have the ~sparc
keyword added, the following additional
items must generally hold:
-
The package must have been tested by an arch team member (or someone with
permission from the arch team) on a
v9
system.
It is generally expected that anyone who does keywording for SPARC should be on
the sparc@
alias.
SPARC instruction set and performance notes
There are three basic SPARC instruction set standards.
-
v7
is the original instruction set used in very old hardware. Gentoo does not shipv7
capable stages, however a sufficiently crazy person could in theory run Gentoo on av7
machine. -
v8
is an extension ofv7
with added support for hardware integer multiplication and division. Last time Gentoo sparc32 (sun4m
) stages were available was on 2006.1 release. -
v9
adds in 64 bit support and a large number of performance-enhancing features. Gentoo sparc64 (sun4u
) stages arev9
.
In addition, individual CPU implementations have slight differences — for example, HyperSparc CPUs have relaxed requirements when it comes to scheduling certain instructions. These are relatively minor differences.
If gcc
is invoked without any -mcpu
parameter, it will generate v7
code. Depending upon the application, this can be anywhere up to five times
slower than v9
code when running on an UltraSparc — cryptographic and
graphics applications which make heavy use of integer multiplication and
division are especially badly hit. For this reason, the comments in
Not filtering variables
are especially important on SPARC.