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 4.0 libgcc_eh static linking


On Mon, Dec 20, 2004 at 01:25:49PM +0100, Roland Lengfeldner wrote:
> The Problem is, that I link another shared library libHugoPerl to the
> resulting libHugo, in order have an interface to perl. A workaround would be
> to link libgcc_eh.a also to libHugoPerl.

No, that is *not* a workaround.  This will not work in all corner cases.

You are supposed to be linking both libraries to libgcc_s.so.  There are
reasons why there must be exactly one copt of the eh routines live in the
system.

This has been true since the beginning of time.  Versions of gcc before
3.0 didn't have any mechanism to do this, which is why exceptions across
shared libraries simply don't work with gcc2.  Since gcc 3.0, we've simply
gotten better at enforcing this restriction.  So the fact that you can no
longer shoot yourself in the foot in this particular manner with 4.0 is in
fact a feature.  



r~


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