This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: libtool insistence upon -fno-rtti -fno-exceptions in libsupc++?
- From: Benjamin Kosnik <bkoz at redhat dot com>
- To: Ned Konz <ned at bike-nomad dot com>
- Cc: libstdc++ at gcc dot gnu dot org
- Date: Tue, 2 May 2006 12:18:29 -0500
- Subject: Re: libtool insistence upon -fno-rtti -fno-exceptions in libsupc++?
- References: <43283771-3516-4E2C-9AD1-1FED5A623179@bike-nomad.com>
> As a result, I'm compiling this as a freestanding library,
> and I suspect that most people will be using "-fno-exceptions -fno-
> rtti" in their compilation.
Be advised that only "-fno-exceptions" is tested (and that, quite
sporadically).
I just built gcc-mainline's libstdc++ with
make CXXFLAGS="-fno-exceptions"
and it worked.
However,
make CXXFLAGS="-fno-exceptions -fno-rtti"
Does not. IMHO, there was never an effort made to get -fno-rtti to
work. Part of the problem is that there is no analogue to
__EXCEPTIONS__ and -fno-exceptions for -fno-rtti.
However, if these sources are removed:
libsupc++/eh_exception.cc
libsupc++/tinfo2.cc
src/debug.cc
src/debug_list.cc
you'll be able to compile libstdc++ successfully.
My recomendation is to just remove those files for your build and
proceed.
> However, when the compilation gets to libsupc++,
> I have problems with libtool insisting upon using "-fno-rtti -fno-
> exceptions" to compile code that uses "typeid", which then fails the
> compilation.
>
> I did not ask for "-fno-rtti -fno-exceptions".
I don't know what this problem is.
best,
benjamin