[oi-dev] Issues pertaining to gcc (for tomorrow's Developer Meeting)

Richard Lowe richlowe at richlowe.net
Mon Jan 16 23:59:25 UTC 2012


> (2) Although illumos-gate can be built with Rich Lowe's gcc, as far as
> I know the decision has not been made to actually use gcc to build it
> for the first stable release of OI.  I would suggest that doing so
> would be a very risky move, because we have so little experience with
> a gcc-built Illumos.  One should be cautious here, and treat a
> gcc-built Illumos as experimental for an extended period of time,
> before actually releasing it to the public.  But if Sun Studio is used
> to build Illumos, what is the advantage of building illumos-userland
> with gcc?  As noted in (1), there is a distinct disadvantage -- that
> it would be harder to keep up with upstream.

illumos-gate builds with gcc3.  You need the changesets I've not yet
integrated for gcc4.

That said, at present the people shipping illumos are building with
either the precisely correct versions of Sun Studio, or building with
gcc4 and shipping something based off of my branch.

It's up to OI whatever they choose to do.

>
> 2. Which versions of gcc should OI/Illumian ship?
>
> It is a given that illumos-gate must be built with gcc 4.4, because
> porting the patches required to get it to build to later versions of
> gcc is a non-trivial task.

Actually, GCC 3.4 at present, which must be delivered to /usr/sfw as now.

> In case Rich is not able to attend tomorrow's meeting, I'll quote what
> he said on #illumos a few minutes ago: "basically, my only view on gcc
> is 'Leave the ones used to build illumos alone, then do whatever you
> want'."

Yes.  As long as you ship 3.4 right now, and are willing to ship a 4.4
(or whatever) when I'm done pushing my branch through, I don't care
about other versions.  Note that failing to ship 3.4 will break the
illumos build on your system, which will annoy a bunch of people
(illumos people).

> 3. Which version of gcc should be preferred for building things other
>   than illumos-gate?
>
> Since Rich Lowe's patches are not required to build illumos-gate, if

I'm presuming this is a typo for "illumos-userland".  The patched GCC
(either Sun's 3.4, or my 4.4) is utterly necessary for illumos-gate.

> 4. Where should the preferred gcc version reside?
>
> The obvious place is in /usr/bin.  Solaris 11 places symlinks to gcc
> 4.5 there.  (OI still places symlinks to gcc 3.4.3 there; it should
> stop doing so as quickly as possible.)

I'd put them all in /usr/gcc/X.Y.Z except for 3.4, which _must_ remain
in /usr/sfw (possibly, it can be symlinked, but I'm not sure).

Symlink the one preferable for end users into /usr.

For automated builds, specify PATH explicitly to pick a constant and
well-known version.

>
> The gcc build of Illumos is done in such a way that Illumos should not
> be affected by the gcc 4.6 runtime residing in /usr/lib.

We don't use libgcc in most cases, except via libstcd++.  When we do
use libstdc++ we explicitly set the runpath ourselves.  This alone
should be fine, but the GCC runtime's attempts at compatibility should
also make this possible.

>
> 6. C++ library ABI incompatibility issues and how to solve them
>

This is a boring and unsolvable problem in the general case.



I'm willing to answer questions about illumos-gate/gcc interactions.
I'm not interested in arguing about what distributions do, nor about
the relative merits of various compilers.

-- Rich




More information about the oi-dev mailing list