[csw-maintainers] Solaris Studio vs GCC

James Lee james at opencsw.org
Sun Mar 18 14:17:06 CET 2012


On 11/03/12, 17:58:10, =?UTF-8?Q?Maciej_=28Matchek=29_Blizi=C5=84ski?=
<maciej at opencsw.org> wrote regarding [csw-maintainers] Solaris Studio vs
GCC:

> I recently spent some time building a couple of libraries with GCC, in
> the /opt/csw/gxx prefix. I was surprised how easy that was. Yes, there
> were some issues, but most of them because of stupid hardcoded stuff
> of the type of "you're on Solaris so you must be compiling with
> something else", and removing Solaris-specific #define bits made
> problems go away. I managed to build Boost 1.49.0 with GCC, but not
> with Solaris Studio - I got about a screenful of templating errors.

> When interacting with upstreams, using Studio often gets in the way. I
> often get responses that if I'm building with Studio, I'm on my own as
> far building is concerned. Overall, using it seems to add workload
> rather than removing it.

> If we plan on keeping on being standardized on Solaris Studio, we
> should have some kind of rationale written up. If it is about
> performance, we should have some numbers put out to show how big the
> benefit is. If it is about helpful error messages, we should have an
> example or two out. Whatever the reason is, some kind of example
> should be put up on one of our web sites.

> Thoughts?

This only matters for C++ linking due differing schemes for name mangling
otherwise we can freely move between cc and gcc - and there's the rub.
It's not about the compiler as such, it's what the question reveals about
openness and freedom.

The joke goes "How many Microsoft engineers does it take to change a
light bulb?  None, Bill Gates declares darkness the standard."  This can
just as easily be applied to GNU, "How many programmers does it take to
debug GNU software?  None, Richard Stallman declares the software the
reference implementation."

<quote src="http://gcc.gnu.org/">
GNU system was developed to be 100% free software, free in the sense that
it respects the user's freedom.
</quote>

This includes users exercising the freedom to not use gcc.  As most of
the projects causing problems are run by people with a quasi-religious
fanaticism to openness and freedom the best hope in effecting change to
the upstream software is to play on this and point out that software
that is locked in to one compiler or system is not open and contravenes
their own beliefs.


>From practical point I always welcomed the feedback by compiling on
more than one system.  This improved my code.

<quote src="http://www.gnu.org/philosophy/pragmatic.html">
My work on free software is motivated by an idealistic goal: spreading
freedom and cooperation. I want to encourage free software to spread,
replacing proprietary software that forbids cooperation, and thus make
our society better.
</quote>

*Also* using cc contributes to software by excluding any particular
compiler's quirks and extensions thus ensuring software's freedom and
increasing cooperation.


If neither improving code nor playing to irrational beliefs work try:

   CC -compat=g ...

Now see which system is cooperative.  Only for x86, I can't see why but
there it is.



James.


More information about the maintainers mailing list