From owner-freebsd-ports Sat May 20 11:54:33 2000 Delivered-To: freebsd-ports@freebsd.org Received: from sharmas.dhs.org (c62443-a.frmt1.sfba.home.com [24.0.69.165]) by hub.freebsd.org (Postfix) with ESMTP id 9468C37B53A; Sat, 20 May 2000 11:54:31 -0700 (PDT) (envelope-from adsharma@sharmas.dhs.org) Received: (from adsharma@localhost) by sharmas.dhs.org (8.9.3/8.9.3) id LAA03401; Sat, 20 May 2000 11:54:13 -0700 Date: Sat, 20 May 2000 11:54:13 -0700 From: Arun Sharma To: "David O'Brien" Cc: kde-devel@kde.org, ports@freebsd.org Subject: Re: C++ exception handling and non Linux platforms Message-ID: <20000520115413.A3392@sharmas.dhs.org> References: <20000519083947.A47819@sharmas.dhs.org> <20000520103959.A12924@dragon.nuxi.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95.6i In-Reply-To: <20000520103959.A12924@dragon.nuxi.com>; from David O'Brien on Sat, May 20, 2000 at 10:39:59AM -0700 Sender: owner-freebsd-ports@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org 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