This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
>> After a brief moment of happiness, the world fell apart again :-)) > >:-( > >> In function `operator new[](unsigned long)': >> ../../../../gcc-3.0/libstdc++-v3/libsupc++/new_opv.cc:35: undefined >> reference to `LLSDA1' > >> Can someone explain what's going on here ?? > >Yep, the exception handling code in the C++ libraries is stuffed. The >full story is complex, but basically, the dwarf2 exception handling model >was changed fairly late in the release process and the ARM back-end didn't >catch up. As a result, it fell back to using setjmp/longjmp unwinding, >and the tables in this format trip a bug in the compiler when used with >dwarf2 debug format (the default for the arm-elf back-end). > >I filed a PR about this earlier this week, but I'm hoping that 3.0.1 will >revert back to having proper dwarf2 based unwinders by default. >R Aaargh!! How does this affect the code size ? In the meantime I found some instructions at http://sources.redhat.com/ecos/tools/win-arm-elf.html and rebuilt everything from scratch. However the instructions there don't tell you that, in order to actually build anything with your cross-compiler you need to build newlib.. I got the latest version (1.9.0) and built it After that I was able to successfully compile and link a simple C app. So far so good. But I need c++ and stl $cd build-gcc3;make all install -- configures libiberty and libstdc++-v3, builds and installs it - no problems: Now, build a simple c++ app: #include <string> void main() { unsigned long* foo = new unsigned long[20]; try{ std::string s("hello"); } catch(...){} } $arm-elf-gcc -v test.cpp -- a bunch of link errors - see below Is there anything I can do to make it work ?? Thanks Andy PS One thing that got me suspicious was that during configuration of libstdc++-v3 it said "Checking for Cygwin environment -- no Checking for mingw environment -- no" whereas when gcc config script ran it did say "yes" on Cygwin environment -- For what it's worth Here's the link errors I get building the simple code above: ************ $arm-elf-gcc -v test.cpp Reading specs from /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/specs Configured with: ../gcc-3.0/configure --target=arm-elf --prefix=/tools3 --exec-prefix=/tools3/H-i686-pc-cygwin --with-gnu-as --with-gnu-ld --with-new-lib --enable-languages=c,c++ Thread model: single gcc version 3.0 /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/cc1plus.exe -v -D__GNUC__=3 -D__GNUC_MINOR__=0 -D__GNUC_PATCHLEVEL__=0 -Acpu=arm -Amachine=arm -D__CHAR_UNSIGNED__ -D__NO_INLINE__ -D__STDC_HOSTED__=1 -D__ARM_ARCH_4T__ -D__APCS_32__ -D__ARMEL__ -D__ELF__ -D__arm__ test.cpp -D__GNUG__=3 -D__GXX_DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase test.cpp -version -o /cygdrive/c/TEMP/ccIpfpOE.s GNU CPP version 3.0 (cpplib) (ARM/ELF non-Linux) GNU C++ version 3.0 (arm-elf) compiled by GNU C version 2.95.3-5 (cygwin special). ignoring nonexistent directory "/tools3/H-i686-pc-cygwin/arm-elf/sys-include" #include "..." search starts here: #include <...> search starts here: /tools3/include/g++-v3 /tools3/include/g++-v3/arm-elf /tools3/include/g++-v3/backward /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/include /tools3/H-i686-pc-cygwin/arm-elf/include End of search list. /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/../../../../arm-elf/bin/as.exe -o /cygdrive/c/TEMP/ccevlBEc.o /cygdrive/c/TEMP/ccIpfpOE.s /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/collect2.exe -X /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/crtbegin.o /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/../../../../arm-elf/lib/crt0.o -L/tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0 -L/tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/../../../../arm-elf/lib /cygdrive/c/TEMP/ccevlBEc.o -lgcc -lc -lgcc /tools3/H-i686-pc-cygwin/lib/gcc-lib/arm-elf/3.0/crtend.o /cygdrive/c/TEMP/ccevlBEc.o: In function `main': /cygdrive/c/TEMP/ccevlBEc.o(.text+0x50): undefined reference to `operator new[](unsigned long)' /cygdrive/c/TEMP/ccevlBEc.o(.text+0xd0): undefined reference to `__cxa_begin_catch' /cygdrive/c/TEMP/ccevlBEc.o(.text+0xdc): undefined reference to `__cxa_end_catch' /cygdrive/c/TEMP/ccevlBEc.o(.text+0xf0): undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `std::string::~string()': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSsD1Ev+0xec): undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `std::string::_Rep::_M_destroy(std::allocator<char> const&)': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs4_Rep10_M_destroyERKSaIcE+0xf4) : undefined reference to `__cxa_call_unexpected' /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs4_Rep10_M_destroyERKSaIcE+0x104 ): undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `char* std::string::_S_construct<char const*>(char const*, char const*, std::allocator<char> const&, std::forward_iterator_tag)': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs12_S_constructIPKcEEPcT_S3_RKSa IcESt20forward_iterator_tag+0x178): undefined reference to `__cxa_begin_catch' /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs12_S_constructIPKcEEPcT_S3_RKSa IcESt20forward_iterator_tag+0x198): undefined reference to `__cxa_rethrow' /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs12_S_constructIPKcEEPcT_S3_RKSa IcESt20forward_iterator_tag+0x1d8): undefined reference to `__cxa_end_catch' /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs12_S_constructIPKcEEPcT_S3_RKSa IcESt20forward_iterator_tag+0x250): undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `std::string::_Rep::_M_refcopy()': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs4_Rep10_M_refcopyEv+0xb0): undefined reference to `__cxa_call_unexpected' /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs4_Rep10_M_refcopyEv+0xc4): undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `std::string::_Rep::_S_create(unsigned long, std::allocator<char> const&)': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs4_Rep9_S_createEmRKSaIcE+0x68): undefined reference to `std::__throw_length_error(char const*)' /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSs4_Rep9_S_createEmRKSaIcE+0x140) : undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `std::__default_alloc_template<true, 0>::allocate(unsigned long)': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSt24__default_alloc_templateILb1E Li0EE8allocateEm+0x17c): undefined reference to `__gxx_personality_sj0' /cygdrive/c/TEMP/ccevlBEc.o: In function `std::__malloc_alloc_template<0>::_S_oom_malloc(unsigned long)': /cygdrive/c/TEMP/ccevlBEc.o(.gnu.linkonce.t._ZNSt23__malloc_alloc_templateILi0EE 13_S_oom_mallocEm+0x2c): undefined reference to `std::__throw_bad_alloc()' collect2: ld returned 1 exit status ------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sourceware.cygnus.com
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |