PSARC/2008/549 - Apache Standard C++ Library
Garrett D'Amore
gdamore at sun.com
Thu Sep 4 12:08:06 PDT 2008
Steve Clamage wrote:
> Regarding g++, let's take a step back.
>
> There is nothing special about the Apache library. It is an
> implementation of the API (programming interface) described by the C++
> standard. *We* care about it because the two implementations of the
> C++ standard library currently supplied with Sun Studio are each
> missing features that some applications need. ("Why" is a long story.)
>
> If you write to the C++ standard API, it should not matter which
> implementation you use. It will matter only if you have a deficient
> implementation. (Missing features, non-standard behavior, or poor
> performance, for example.)
>
> G++ comes with its own implementation of the C++ standard library that
> is quite standard-conforming. You should be able to build the apps
> with g++ without the Apache library. (If you have tried and found that
> they don't work, I would be surprised, because nearly all Open Source
> apps are developed using gcc, then tweaked to work with other compilers.)
Ah, that was not something I was aware of -- I thought GNU C++'s library
also fell short of the mark. Given that it's not, I'm surprised that
Apache decided to create their own implementation instead of just
telling folks to "use Gnu C++". I guess we should be glad they took
the time to make an alternate implementation available for us!
>
> I think that if we created a version of libstdcxx built with g++,
> there would be no users. Using libstdcxx with g++ has at least the
> same issues as using libcstdcxx with Sun Studio without direct
> compiler support -- command lines get rather tricky. And it's not
> clear that libstdcxx would have significant advantages over the g++
> library in any case.
Okay, if other folks can corroborate your claims, then I agree we can
safely dispense with any need for a g++ port.
>
> G++ has an additional trouble spot: the g++ ABI is not particularly
> stable. If you build a library with one version of g++, you cannot be
> sure it will work with another compiler version. If we provided a g++
> version of libstdcxx, we would have to document it as known to work
> with only a specific version of g++.
Yeah, good point. I'm surprised more people don't complain about this
instability.
>
> My recommendation is not to consider further a g++ version of libstdcxx.
Concur, provided that no contradictory information to your claims surface.
-- Garrett
More information about the opensolaris-arc
mailing list