This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: gcc 3.3


On 30-Jul-2002, Chris M. Hickman <twoheadedboy@stonepool.com> wrote:
> I didn't see this addressed on the site...will 3.3 be binary compatible 
> with 3.2 (unlike 3.2>3.1)?

The hope is that yes, C++ compiled with gcc 3.3 will be binary compatible
with 3.2.  However, there's no guarantees; if gcc 3.2 turns out to have
ABI bugs, like 3.1 did, then they will need to be fixed.  The hope is
that all the ABI bugs have now been caught, but no-one knows for sure.

In addition, the libstdc++ ABI is not yet stable, so it is very
likely that there will be changes in libstdc++ that don't preserve the
libstdc++ ABI.  However, on platforms that support symbol versioning
(e.g. Linux), symbol versioning could in theory be used to reduce the
impact of such changes.  Note that symbol versioning is only a partial
solution; it can keep existing *executables* working with new versions
of libstdc++.so, but there may be problems with existing .so files,
.a files, or .o files that reference libstdc++.so.

(Why do you ask?)

P.S. I have a question of my own regarding symbol versioning.  Suppose I
have a C++ library `libfoo.so' that references libstdc++.so, and an
application `bar' that references both libfoo.so and libstdc++.so, and
suppose an ABI-breaking change is made to libstdc++.  A new version of
libstdc++ is installed; this has both the symbols for the new libstdc++
ABI, and symbols compatible with the old libstdc++ ABI, marked with the
old version number.  So `bar' continues to work.  Now, I try to compile
an application `baz' that references both libfoo.so and libstdc++.so.
`baz' uses the new version of the libstdc++.so ABI, but libfoo.so refers
to the old version.  To make `baz' work, I'd need to upgrade libfoo.so
to a version that uses the new version of the libstdc++.so ABI.  But that
would break `bar', wouldn't it?  (Or am I just hopelessly confused about
how symbol versioning works?)  Is there any simple way I can make `baz'
work without needing to recompile `bar', and without needing to bump
the libstdc++.so major version number?

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]