Notes for building XFree86 on Solaris

Information for Solaris : Notes for building XFree86 on Solaris
Previous: The VT-switching sub-system in Solaris x86
Next: Notes for running XFree86 on Solaris

## 3. Notes for building XFree86 on Solaris

1. Both GCC, and ProWorks are supported by XFree86. The minimum recommended GCC release is 2.7.2. Some earlier GCC's are known to not work and should be avoided.

   You should also make certain your version of GCC predefines `sun'. If needed edit `/usr/local/lib/gcc-lib/*/*/specs`, and modify the `*predefines:` line.

   On SPARCs, regardless of the compiler you use, ensure it generates 32-bit binaries. At this time, 64-bit binaries will probably not work.

2. Also on SPARCs, you will need to set BuildXFree86OnSparcSunOS to YES in ~xc/config/cf/host.def. Otherwise, you can only build the old deprecated Xsun* servers.
3. A Threaded Xlib compiled with GCC has subtle problems. It'll work 98% of the time, however clients will occasionally exhibit strange hangs. Most notably image viewers such as xv-3.10 exhibit this problem.

   It is recommended that you set ThreadedX in `~xc/config/cf/host.def` to NO, if you are using GCC. ProWorks does not have this problem. Whether this behaviour still exists with newer GCC's has not been verified.

4. To build XFree86 with GCC you need gcc and (optionally) c++filt from GNU binutils. Don't install gas or ld from GNU binutils, use the one provided by Sun.

   You might need to setup a /opt/SUNWspro/bin directory containing symbolic links named `cc`, `CC`, and `c++filt` pointing respectively to the actual `gcc`, `g++` and `c++filt` commands.

5. If you are using ProWorks to compile the XFree86 distribution, you need to modify your PATH appropriately so the ProWorks tools are available. Normally, they should be in `/opt/SUNWspro/bin`
6. You MUST put `/usr/ccs/bin` at the front of your PATH. There are known problems with some GNU replacements for the utilities found there. So the `/usr/ccs/bin` versions of these programs must be found before any possible GNU versions. (Most notably GNU '`ar`' does not work during the build).

Information for Solaris : Notes for building XFree86 on Solaris
Previous: The VT-switching sub-system in Solaris x86
Next: Notes for running XFree86 on Solaris