[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: BinNMU for ftgl-dev?



Steve Langasek <vorlon@debian.org> writes:
> On Fri, Mar 03, 2006 at 08:32:53PM -0800, Russ Allbery wrote:

>> It rebuilds ftgl-dev with the current g++, changing the exception
>> handling symbols in the static library to match the libraries currently
>> used on hppa and m68k.

> Ok, so this is a left-over from the c2a transition?

I don't *think* it is.  It seems to be something different.  The c2a
transition, as I understood it, was about exposed allocator symbols.  This
appears to be about a change in exception handling.

The following is based on my vague memory of the issue from following the
GCC mailing list, although I don't fully understand the issues involved:
GCC supports several different mechanisms for doing exception handling in
C++ code.  The exception handling code has to agree among all the objects
and libraries linked together, and some pieces of it involve global
objects that have to be instantiated only once, so there are pieces of it
in libgcc and in libgcc_eh.  There are also other pieces of it in
libsupc++, the repository of code needed for all C++ binaries even if they
don't use the standard library.

All this is internal, but since there must be only one instance of some of
these symbols across all of the objects linked together to make a binary,
there are unresolved symbols in static libraries that are resolved when
they're linked into a binary.

Now, hppa and m68k used to use SJLJ (setjmp/longjmp) exception handling,
which as I understand it is the old and creaky method (but highly
portable).  It looks like, in the 3.4 cycle, hppa and m68k switched from
SJLJ to the same exception handling method used on other platforms (it's
called v0 instead of sj0 in symbols, but I don't know what it's real name
is).  As a result, libgcc_eh and libsupc++ for gcc 3.4 and later no longer
provide the SJLJ symbols on those platforms.  And old static C++ libraries
won't link properly with the current compiler.

In other words, I believe it's an ABI change on hppa and m68k that only
affects static libraries.  I think it's independent of and separate from
the c2a changes.  My guess on why we've not seen much of this is that
static C++ libraries are a fairly rare beast.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: