This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 4.0 libgcc_eh static linking
- From: Richard Henderson <rth at redhat dot com>
- To: Roland Lengfeldner <lengfeldner_roland at gmx dot at>
- Cc: gcc at gcc dot gnu dot org
- Date: Mon, 20 Dec 2004 16:42:18 -0800
- Subject: Re: gcc 4.0 libgcc_eh static linking
- References: <20210.1103545549@www42.gmx.net>
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~