Date: Wed, 12 Mar 2003 18:19:23 -0600 (CST) From: Loren James Rittle <rittle@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 Message-ID: <200303130019.h2D0JNCa005456@latour.rsch.comm.mot.com> In-Reply-To: <20030312125308.J59497@cvs.imp.ch>
next in thread | previous in thread | raw e-mail | index | archive | help
>> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200303130019.h2D0JNCa005456>
