This page tracks bugs and issues related to building OpenSolaris with the Sun Studio 12 compilers. This information was all culled from various emails and bug reports. Thanks to everyone who did the heavy lifting here.
There is a bug keyword (s11-cbe-mars) that should be attached to any Sun Studio 12 bugs or OpenSolaris bugs that need fixing to support building OpenSolaris with SS12.
Get the latest patches
There are been many compiler bugs fixed in Sun Studio 12 patches. So make sure you have at least all the -01 patches for the compilers. It's simplest to just download all the latest patches if you've installed from packages. The first round of patches was included with the ML release of Sun Studio 12, so if you download Sun Studio 12 from the Sun Download Center, it should include the initial patches. You can test this by using 'cc -V'. You should see a patch-id in the output like:
How to build with Sun Studio 12
In order to build OpenSolaris with the Sun Studio 12 compilers you need to add the following line to your environment file:
See usr/src/Makefile.master for details (search for __SSNEXT)
You also need to set SPRO_VROOT to the alternate compilers.
Current Issues
Fixes needed in OpenSolaris:
6578211 cw doesn't accept -m32/-m64 options
Not fixed yet.
6508332 Many lint errors reported on the onnv gate when mars's lint is used.
Not fixed yet.
Fixes needed in the compilers:
6586975 dtrace cores on onnv built with ss12 fcs
Fix done. Scheduled for a patch.
6586614 zfs_mknode asserts at kernel built with ss12
Fix done. Scheduled for a patch.
6595514 kenbus on onnv build with ss12 is 10% slower
Some improvement using SS12 patches. Unclear what the next step is from the CR.
Resolved Issues
There are some changes that were required in OpenSolaris source in order to cope with the new compilers. These have already been dealt with, but they are recorded here for posterity. Not all of these are fixed bugs. But I think they are not showstoppers for SS12 adoption at this point.
OpenSolaris fixes
Change -Wu,-xmodel=kernel to -xmodel=kernel.
Both SS11 and SS12 accept -xmodel=kernel. This was fixed a while ago.
Use -m64 instead of -xarch=amd64 (to avoid a warning)
This is not a compatible change. SS11 only takes xarch=amd64, and SS12 will warn if you use -xarch=amd64. This was a mistake in SS12 (it makes transitioning difficult) and the compiler group hopes not to repeat the same mistake. This issue is not currently planned to be patched away.
CDE depends on a bug in the C++ compiler that was fixed in a SS11 patch.
I think they're still using SS10.
6561990 CDE 1.7 fails to build on sparc after SunStudio was patched
6564479 Unable to build libssl using Studio 12
This is a workaround for compiler bug 6555899 (see below)
6554132 mdb's genunix module overloads the "sys/panic.h" variables causing Studio 12 build to fail
Fixed in build 66. This works around compiler bug 6553840 (see below)
6538819 ict_tcgeta() accesses lx_termio.c_cc[LX_VEOL] which doesn't exist
Fixed in build 64. New compiler uncovered bad code.
6470487 ld relocation errors occur when building the amd64 kernel for nevada with mars build 30
This bug included the implementation of __SSNEXT
It was fixed in build 51.
Compiler fixes
There are also compiler bugs that have been uncovered and are being worked on.
6555899 Studio 12 semantic checker is too aggressive when checking lines that will never be executed
Invalid but unreachable code is still diagnosed.
This is worked around in libssl by the fix for 6564479 (see above)
6553840 mdb's genunix module fails to compiler when using Studio 12 build 45 or newer
This was worked around in mdb by the fix for 6554132 (see above)
Proposed patch snapshot
The official Solaris CBE has uses a snapshot with a fixed set of patches to guarantee stability. Here is a copy of some internal email that lists the proposed set of patches. Notice we're still waiting for one specific patch. You can find more information about these patches (like which bugs are fixed in each patch) by looking on the SunSolve website, and searching by patch id.