Forums | developer.brewmp.com Forums | developer.brewmp.com

Developer

Forums

Hi,

I followed the instructions at http://brew.wardco.com/ in an attempt to get the WinARM chain working, but to no avail. After some trial and error, I discovered that if I use the libc.a library from the GNUDE chain, it links fine, but if I use WinARM's libc.a library (4.1.0 or 4.1.1) I get these errors. I of course would like to use one whole tool chain, not two partial ones.

I have -fno-exception and -fno-rtti set as well. Here are my compiler command line options:

-DDYNAMIC_APP -mcpu=arm7tdmi -mthumb-interwork -mlittle-endian -fshort-enums
-fno-builtin -ffunction-sections -fno-exceptions -fno-unwind-tables -fno-rtti -g
-IC:\WinARM\arm-elf\include -IC:\Brew\3.1.5\sdk\inc -IC:\WinARM\lib\gcc\arm-elf\4.1.1\include -IC:\WinARM\include -Os.

The linker is getting the these libraries in this order: -lsubc++ -lc -lgcc. Here are the options for ld:

--script C:\gnude\bin\elf2mod.x -Ttext 0 --emit-relocs -entry AEEMod_Load

And here are the errors I get:

c:/WinARM/arm-elf/lib\libsupc++.a(eh_personality.o): In function `read_encoded_value_with_base':
c:/winarms/gcc-4.1.1/gcc/unwind-pe.h:259: undefined reference to `abort'
c:/WinARM/arm-elf/lib\libsupc++.a(eh_personality.o): In function `base_of_encoded_value':
c:/WinARM/arm-elf/lib\libsupc++.a(eh_personality.o): In function `size_of_encoded_value':
c:/WinARM/arm-elf/lib\libsupc++.a(eh_terminate.o): In function `__cxxabiv1::__terminate(void (*)())':
../../../../../gcc-4.1.1/libstdc++-v3/libsupc++/eh_terminate.cc:44: undefined reference to `abort'
c:/WinARM/arm-elf/lib\libsupc++.a(eh_terminate.o):../../../../../gcc-4.1.1/libstdc++-v3/libsupc++/eh_terminate.cc:46: more undefined references to `abort' follow
c:/WinARM/arm-elf/lib\libc.a(fopen.o): In function `_fopen_r':
fopen.c:(.text+0x48): undefined reference to `_open_r'
c:/WinARM/arm-elf/lib\libsupc++.a(eh_terminate.o):../../../../../gcc-4.1.1/libstdc++-v3/libsupc++/eh_terminate.cc:46: more undefined references to `abort' follow
c:/WinARM/arm-elf/lib\libc.a(fopen.o): In function `_fopen_r':
fopen.c:(.text+0x48): undefined reference to `_open_r'
c:/WinARM/arm-elf/lib\libc.a(freer.o): In function `_malloc_trim_r':
mallocr.c:(.text+0x48): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x64): undefined reference to `_sbrk_r'
mallocr.c:(.text+0x84): undefined reference to `_sbrk_r'syswrite.c:(.text+0x24): undefined reference to `_write_r'
C:\WinARM/lib/gcc/arm-elf/4.1.1/\libgcc.a(unwind-sjlj.o): In function `_Unwind_RaiseException_Phase2':
../../../gcc-4.1.1/gcc/unwind.inc:75: undefined reference to `abort'
C:\WinARM/lib/gcc/arm-elf/4.1.1/\libgcc.a(unwind-sjlj.o): In function `_Unwind_SjLj_Resume':
../../../gcc-4.1.1/gcc/unwind.inc:238: undefined reference to `abort'
C:\WinARM/lib/gcc/arm-elf/4.1.1/\libgcc.a(unwind-sjlj.o): In function `_Unwind_SjLj_Resume_or_Rethrow':
../../../gcc-4.1.1/gcc/unwind.inc:263: undefined reference to `abort'
NMAKE : fatal error U1077: 'C:\WinARM\bin\arm-elf-ld.EXE' : return code '0x1
Has anyone encountered a similar issue? I'm pretty much stuck here; any insight would be appreciated.

define your own __cxa_pure_virtual function like this
void __cxa_pure_virtual (void) {}
because WinARM use newlib, some functions must be user defined. The default __cxa_pure_virtual function of WinARM use these undefine functions.

define your own __cxa_pure_virtual function like this
void __cxa_pure_virtual (void) {}
because WinARM use newlib, some functions must be user defined. The default __cxa_pure_virtual function of WinARM use these undefine functions.