Trouble building 4.4.2 cross compiler for arm-elf target

Tobias Ringström tobias@ringis.se
Thu Nov 19 14:59:00 GMT 2009


On 11/19/2009 02:58 PM, Kai Ruottu wrote:
> Tobias Ringström wrote:
>> I've successfully built many earlier versions (including 4.4.1) using
>> the same command line without any problems. I've searched the mailing
>> list and the web but not managed to find anything useful.
>
> You must then have had the earlier C library preinstalled...

No, I'm sure there wasn't. GCC did support this for arm-elf, but whether 
by design or by accident I cannot say.

> With your $target  most people use 'newlib' as the C library and if one
> uses that, producing the GCC should succeed without a pre-existing
> target C library.  Only installing the generic newlib headers or 
> building newlib
> with GCC (copying/symlinking 'newlib' and 'libgloss' from newlib srcs
> into the main GCC src dir) are required...  But then one must tell that
> via the '--with-newlib' option in GCC configure!

I've built with newlib once or twice before as well, but it was too 
bloated for my application, so I had to use a tinier libc. I don't know 
how to integrate the build of that libc into the GCC build system, and 
it's also easier to have the source code for the tiny libc version 
controlled together with the application source code.

The build fails because gcc tries to build libiberty for the target, 
which was never done before. I think the key is to figure out why this 
is done, but I don't know how to do that.

I guess I could try building with newlib and never use it (-nostdlib 
etc), but I'd rather find and fix the bug if possible (or learning that 
I was just lucky before).

/Tobias



More information about the Gcc-help mailing list