Trying to build crosscompiler for ARM

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

I'm new to this list so please bear with me :)

I spend the last to days on trying to build a GCC C cross compiler for arm (target is a bare metal system without glibc or the like; arm-elf-eabi). With very little success.

I first tried to build gcc (the entire collection) 4.4.2. I soon noticed that I should rather pick the gcc-core-4.4.2 package to avoid problems with gcc expecting glibc stuff (crti.o missing, for example). Anyway trying to compile this gives me a quite confusing "Link test not allowed after GCC_NO_EXECUTABLES" error.

So I went back to 4.4.1 which I successfully compiled a while ago already. In fact, none of the above problems appeared and compilation went OK. But now I have a even more strange problems. I just can't get unwind exceptions out!

configure line is: --target=arm-elf-eabi --enable-languages=c --disable-libssp --disable-libunwind-exceptions.

But no matter how often I compile actual code (rockbox svn which is an open source firmware for mp3player that does not use any standard libs (no glibc, newlib or uclibc)), when I try to compile actual code I get loads of errors:

arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/../../../../arm-elf-eabi/bin/ld: error: no memory region specified for loadable section `.ARM.extab'


... [after assigning a dummy section]

arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/../../../../arm-elf-eabi/bin/ld: error: no memory region specified for loadable section `.ARM.exidx'


... [after assigning a dummy section]


LD rockbox.elf
/home/kugel/.rockbox/compiler/arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/arm9tdmi/libgcc.a(unwind-arm.o): In function `get_eit_entry':
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/unwind-arm.c:614: undefined reference to `__exidx_start'
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/unwind-arm.c:614: undefined reference to `__exidx_end'
/home/kugel/.rockbox/compiler/arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/arm9tdmi/libgcc.a(unwind-arm.o): In function `unwind_phase2':
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/unwind-arm.c:698: undefined reference to `abort'
/home/kugel/.rockbox/compiler/arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/arm9tdmi/libgcc.a(unwind-arm.o): In function `__gnu_Unwind_Resume':
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/unwind-arm.c:885: undefined reference to `abort'
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/unwind-arm.c:903: undefined reference to `abort'
/home/kugel/.rockbox/compiler/arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/arm9tdmi/libgcc.a(pr-support.o): In function `_Unwind_GetTextRelBase':
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/pr-support.c:400: undefined reference to `abort'
/home/kugel/.rockbox/compiler/arm-elf-eabi/bin/../lib/gcc/arm-elf-eabi/4.4.1/arm9tdmi/libgcc.a(pr-support.o): In function `_Unwind_GetDataRelBase':
/build/build-gcc-core-4.4.1/arm-elf-eabi/arm9tdmi/libgcc/../../../../gcc-core-4.4.1/libgcc/../gcc/config/arm/pr-support.c:394: undefined reference to `abort'
collect2: ld returned 1 exit status
make: *** [/home/kugel/rbdev/rockbox-git/build-fuze2/rockbox.elf] Fehler 1


Clearly this unwind stuff is still there despite of my --disable-unwind-exceptions.

So my question is why does 4.4.2 not compile for me, and what the heck can I do about this unwind stuff. I really don't want that because Rockbox doesn't need it (it uses plain C and assembly only) and doesn't implement the functions this unwind apparently needs.

BTW, arm-elf-gcc 4.0.3 (no eabi!) builds and compiles Rockbox fine, even without --disable-libssp and --disable-unwind-exceptions.

Best regards.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux