With the pushes of 4719, 5878, and 5879, one may now build stock illumos-gate
on OmniOS, revisions r151014 or later.

An OmniOS .env file will need certain variables set. I'm attaching a sample
one I use, but I will go over the critical variables here.

To build on OmniOS, you must:

1.) Use "gcc only" build.

# GCC-only, REQUIRED for building on OmniOS.
__GNUC=""; export __GNUC
CW_NO_SHADOW=1; export CW_NO_SHADO


2.) Use ONLY_LINT_DEFS along with the sunstudio12.1 version of lint you can
get as a binary with OmniOS:

# Lint if you have the OmniOS-supplied usable-for-linting-only sunstudio12.1.
ONLY_LINT_DEFS=-I${SPRO_ROOT}/sunstudio12.1/prod/include/lint; export ONLY_LINT_DEFS


3.) Change the GCC_ROOT to OmniOS's. You have to do this for illumos-omnios
as well, so this shouldn't be shocking:

GCC_ROOT=/opt/gcc-4.4.4/; export GCC_ROOT


4.) Set the PERL_* variables to cope with OmniOS using perl 5.16.1:

# These are required for building on OmniOS.
export PERL_VERSION=5.16.1
export PERL_PKGVERS=-5161
export PERL_ARCH=i86pc-solaris-thread-multi-64int


5.) Like with illumos-omnios, set ONNV_BUILDNUM to THE SAME release as you
wish to ONU from. So if you're building mid-2015's bloody, set it to 151015,
if you're ONUing the current stable, use 151014:

# SET ONNV_BUILDNUM appropriately - to ONU r151014, set this to 151014.
export ONNV_BUILDNUM=151014


Please note that if you build illumos-gate on OmniOS, you cannot ONU a
non-OmniOS machine with the generated packages. You CAN ONU an OmniOS
machine, however (just make sure ONNV_BUILDNUM matches the release you wish
to ONU from).

Thanks!
Dan