This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trying to build crosscompiler for ARM

Thomas Martitz <> 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?

> 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.

> 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?

> 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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]