Re: Trying to build crosscompiler for ARM

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

 



Oopps, I send this mail (twice) to Ian off-list, accidentally (blame thunderbird).


Ian Lance Taylor schrieb:
Thomas Martitz <thomas.martitz@xxxxxxxxxxxxxxxxxxxxx> writes:

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.

This is more-or-less normal when trying to build libstdc++ with a
toolchain configured without a library.  Are you sure you did a
completely clean configure in an empty directory after going back to
gcc-core?  What was being built when you got that error?


Yes, completely clean. Different source package and different build
directory. I may have a look again to see where it failed. I built with
-j3 so it wasn't easily visible.


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.

The configure option --disable-libunwind-exceptions has been
ineffective for several releases now.  The option name was changed
because it was poorly chosen.  The option is now called
--with-system-libunwind.  The option does not control whether or not
gcc generates unwind information; it controls whether gcc uses the
separately distributed libunwind library or whether it uses the unwind
library which is built into gcc itself.



So, can I get gcc without unwind at all? I really only need the C
compiler and no unwind 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'

This is telling you that your linker script uses memory regions say
which region .ARM.extab should be in.  Certainly the easiest approach
is to assign memory regions as you did.

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'

This should be defined in -lgcc.  Are you linking against -lgcc?  Does
it define that symbol?


I'm not sure, but I assume so since we (Rockbox) rely on the division
routines for ARM. I haven't seen an explicit mention of -lgcc though.

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

--disable-unwind-exceptions does nothing here.  Check which files
contain .ARM.extab sections and compile them with -fno-unwind-tables.
It may just be a few of the gcc startup files which were compiled with
an explicit -funwind-tables.  Or -funwind-tables may be the default,
although I don't see anything making that be the case for ARM EABI.

Ian

No files contain that. In fact I needed to add these sections for my
compiled. We have our own startup (crt0.S if you mean those) files so
they don't use unwind.
Does -fno-unwind-tables set globally deactive it for the whole source?

Thanks for your kind answer.

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