Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: richlowe/gcc --> illumos/gcc

...

GCC_ROOT - The path to the prefix to which the patched GCC was installed (defaults to /opt/gcc/4.4.4)

Thus, if you want to build with Sun Studio, but GCC 4.x as the shadow your environment file should contain:

GCC_ROOT=/where/you/put/gcc
__GNUC4=""

If you want to use GCC4 as the primary compiler, it should contain:

GCC_ROOT=/where/you/put/gcc
__GNUC=""
__GNUC4=""

Switching between GCC versions (or building with GCC4 for the first time)

Tools built for GCC 4 will use GCC 4 by default, and tools built for GCC 3 will use GCC 3 by default, if you need to override this (to toggle quickly back and forth between GCC 3 and GCC 4, for instance) you must also set set CW_GCC_DIR to the directory containing the gcc binary in question, so that your existing build tools will use the GCC in question, while re-building themselves. The  The first time you build using GCC 4, you will have tools in in /opt/onbld that  that will default to using GCC 3 and so you will also need to set CW_GCC_DIR.  In both instances, this  This is true regardless of whether GCC is the primary or shadow compiler.

Thus, if you want to build with Sun Studio, but GCC 4.x as the shadow your environment file should contain:

GCC_ROOT=/where/you/put/gcc
__GNUC4=""

If you want to use GCC4 as the primary compiler, it should contain:

GCC_ROOT=/where/you/put/gcc
__GNUC=""
__GNUC4=""

And if you are switching between versions, both examples should also contain:

CW_GCC_DIR=/where/you/put/gcc/bin

Fix your closed-bins

There's an important catch here. As is the case with GCC 3, the closed kernel modules which had their CTF information merged against the June 2010 genunix will need that CTF information removed to avoid causing problems for both DTrace and mdb.

...