Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 May 2000 11:54:13 -0700
From:      Arun Sharma <adsharma@sharmas.dhs.org>
To:        "David O'Brien" <obrien@freebsd.org>
Cc:        kde-devel@kde.org, ports@freebsd.org
Subject:   Re: C++ exception handling and non Linux platforms
Message-ID:  <20000520115413.A3392@sharmas.dhs.org>
In-Reply-To: <20000520103959.A12924@dragon.nuxi.com>; from David O'Brien on Sat, May 20, 2000 at 10:39:59AM -0700
References:  <20000519083947.A47819@sharmas.dhs.org> <20000520103959.A12924@dragon.nuxi.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sat, May 20, 2000 at 10:39:59AM -0700, David O'Brien wrote:
> On Fri, May 19, 2000 at 08:39:47AM -0700, Arun Sharma wrote:
> > Most non Linux platforms do not link in libgcc.a by default.
> 
> Uh... NO!  Try running ``cc -v'' sometimes on FreeBSD.  libgcc.a is a
> *REQUIRED* library to link against when using GCC.
> 
> There is C++ exception handling code in Linux's glibc2, that I cannot
> fathom why they put it there.  I have a feeling your problems are the
> fault of the software you are trying to port.
> 
> >From other things you've said, I would say libtool could also have a bug
> and be at fault.

Another piece of useful info, on why this doesn't happen on Linux. When
I link a simple shared library using C++ exception handling:

FreeBSD:

$ nm libfoo.so | grep __eh
         U __eh_alloc
         U __eh_rtime_match   

Linux:

$ nm libfoo.so | grep __eh
         U __eh_alloc

I suspect that this is more of gcc-2.95'ism than a FreeBSD'ism.

Bottomline: adding -Wl,-export-dynamic to the linker commandline in KDE
builds solves everything, at the expense of a slightly bloated symbol 
table and a little bit slower run time linking.

	-Arun


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-ports" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000520115413.A3392>