This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: libstdc++ darwin multilibbing support

> As I recall, using std::exception is problematic, as it creates 
> unresolved references to what and friends, and those to typeinfo 
> things, and those to rtti and friends, and those have stuff that I've 
> not untangled yet.  In my case, -fno-rtti is also used, so, the lack of 
> the typeinfo stuff doesn't matter to me.
> Now, if one multilibs and has exceptions, one can build all the 
> routines.  My problem is that I am trying to build the without 
> exceptions.  This, is because the flag I'm multilib on doesn't support 
> exceptions.

Ah. Apparently, you are trying to build libsupc++ with

CXXFLAGS="-fno-exceptions -fno-rtti"

This doesn't work, as you've pointed out. I don't believe it ever has.

Perhaps it makes more sense to break this patch into this, expanded
support for no-exceptions no-rtti, and the config bits which are already

With your patch, I still am unable to build with the above CXXFLAGS.

/mnt/hd/bld/gcc/gcc/xgcc -shared-libgcc -B/mnt/hd/bld/gcc/gcc/ -nostdinc++ -L/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/src -L/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/src/.libs -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/bin/ -B/mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/lib/ -isystem /mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/include -isystem /mnt/hd/bld/H-x86-gcc/i686-pc-linux-gnu/sys-include -I/mnt/hd/src/gcc/libstdc++-v3/../gcc -I/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include/i686-pc-linux-gnu -I/mnt/hd/bld/gcc/i686-pc-linux-gnu/libstdc++-v3/include -I/mnt/hd/src/gcc/libstdc++-v3/libsupc++ -fno-exceptions -fno-rtti -fno-implicit-templates -Wall -Wextra -Wwrite-strings -Wcast-qual -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c /mnt/hd/src/gcc/libstdc++-v3/libsupc++/  -fPIC -DPIC -o tinfo2.o
/mnt/hd/src/gcc/libstdc++-v3/libsupc++/ In member function 'virtual bool __cxxabiv1::__pbase_type_info::__do_catch(const std::type_info*, void**, unsigned int) const':
/mnt/hd/src/gcc/libstdc++-v3/libsupc++/ error: cannot use typeid with -fno-rtti
/mnt/hd/src/gcc/libstdc++-v3/libsupc++/ error: cannot use typeid with -fno-rtti
/mnt/hd/src/gcc/libstdc++-v3/libsupc++/ In member function 'virtual bool __cxxabiv1::__pointer_type_info::__pointer_catch(const __cxxabiv1::__pbase_type_info*, void**, unsigned int) const':
/mnt/hd/src/gcc/libstdc++-v3/libsupc++/ error: cannot use typeid with -fno-rtti
make: *** [tinfo2.lo] Error 1
make: *** Waiting for unfinished jobs....

Anyway. You get the deal.

I am now of the opinion that all rtti/exception related symbols should
not be defined when you are compiling with these flags. Ie, #ifdef
__EXCEPTIONS should mean that symbols are only defined in libsupc++ for new/delete.

If we're going to do this, let's be consistent about it, and not do a
ton of per-function bits.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]