Hi,

I am using avr-g++ for building my projects for avr and i am happy with it. :-)
But i would need exception support, and could not find how to get it work. :-(
I found some mails in the archive (dated many years ago) about possibility of
building libstdc++ or libsupc++ with exception support, but could not find
how to do it. Reportedly it uses 10...20 kbytes of text, which would be 
acceptable.

Currently i have gcc 4.6.2 sources, and have tried the options 
--enable-sjlj-exceptions,
--with-exceptions, --with-rtti, --enable-libstdc++, etc... no one helped.

The result of my compilation is:

x.cpp:(.text+0x3c): undefined reference to `__gxx_personality_sj0'
x.cpp:(.text+0x3e): undefined reference to `__gxx_personality_sj0'
x.cpp:(.text+0xea): undefined reference to `__cxa_begin_catch'
x.cpp:(.text+0xf8): undefined reference to `__cxa_end_catch'
/tmp/ccmKuGSC.o:(.gcc_except_table+0x9): undefined reference to `typeinfo for 
void*'
collect2: ld returned 1 exit status

The source is:

int main(int argc, char ** argv)
{
 try {
    some_function();
 } catch (void *) {
    return 1;
 }
 return 0;
}

Please help me how to build the c++ library!

Thanx in advance
Gyorgy Kovesdi

_______________________________________________
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
https://lists.nongnu.org/mailman/listinfo/avr-gcc-list

Reply via email to