From owner-freebsd-current Wed Mar 12 16:20:43 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 970CE37B401 for ; Wed, 12 Mar 2003 16:20:41 -0800 (PST) Received: from motgate.mot.com (motgate.mot.com [129.188.136.100]) by mx1.FreeBSD.org (Postfix) with ESMTP id 86BF243FAF for ; Wed, 12 Mar 2003 16:20:40 -0800 (PST) (envelope-from rittle@latour.rsch.comm.mot.com) Received: from mothost.mot.com (mothost.mot.com [129.188.137.101]) by motgate.mot.com (Motorola/Motgate) with ESMTP id h2D0KdXR001109; Wed, 12 Mar 2003 17:20:39 -0700 (MST) Received: [from latour.rsch.comm.mot.com (latour.rsch.comm.mot.com [145.1.80.116]) by mothost.mot.com (MOT-pobox 2.0) with ESMTP id RAA01303; Wed, 12 Mar 2003 17:20:39 -0700 (MST)] Received: from latour.rsch.comm.mot.com (localhost.rsch.comm.mot.com [127.0.0.1]) by latour.rsch.comm.mot.com (8.12.8/8.12.8) with ESMTP id h2D0JO3M005459; Wed, 12 Mar 2003 18:19:24 -0600 (CST) (envelope-from rittle@latour.rsch.comm.mot.com) Received: (from rittle@localhost) by latour.rsch.comm.mot.com (8.12.8/8.12.8/Submit) id h2D0JNCa005456; Wed, 12 Mar 2003 18:19:23 -0600 (CST) Date: Wed, 12 Mar 2003 18:19:23 -0600 (CST) From: Loren James Rittle Message-Id: <200303130019.h2D0JNCa005456@latour.rsch.comm.mot.com> To: current@freebsd.org Cc: mb@imp.ch Subject: Re: C++ Exception handling with shared libs in current is broken again In-Reply-To: <20030312125308.J59497@cvs.imp.ch> Organization: Networks and Infrastructure Lab (IL02/2240), Motorola Labs Reply-To: rittle@labs.mot.com User-Agent: SEMI/1.14.4 (Hosorogi) FLIM/1.14.4 (=?ISO-8859-4?Q?Kashiharaji?= =?ISO-8859-4?Q?ng=FE-mae?=) LEMI/1.14.1 Emacs/21.2 (i386--freebsd) MULE/5.0 (SAKAKI) MIME-Version: 1.0 (generated by SEMI 1.14.4 - "Hosorogi") Content-Type: text/plain; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG >> I do know now why I have again problems with building openoffice. >> It seems that exceptions over shared libraries are broken again in >> CURRENT. >> Alexander, do you have a idea why this got broken again ? > rtld from 19.October has the same problem. I guess it must be gcc3.2 > which is the problem. [This response addresses your other thread as well: ld -Bsharable broken in CURRENT ?] Hi Martin, If you really want to directly use ld to build a shared C++ image, then you will need to do additional study because a lot of things changed between gcc 2 (used longjump-based EH) and gcc 3 (dwarf-region based EH, requires more environment support). From gcc 3.2.2 documentation as installed on CURRENT (regarding the *only* supported way to make a C++ shared library): "However, if a library or main executable is supposed to throw or catch exceptions, you must link it using the G++ or GCJ driver, as appropriate for the languages used in the program, or using the option @option{-shared-libgcc} [to the gcc driver], such that it is linked with the shared @file{libgcc}." Now, FreeBSD might have guaranteed other ways in the past, but from the gcc side of things, this is the only supported way to make a C++ shared image with gcc3 on modern ELF platforms: foo.so: foo.o ${CXX} -shared -o foo.so foo.o Regards, Loren To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message