Installing headers with 0.9.29 spawns gcc errors

Carmelo AMOROSO carmelo.amoroso at
Tue Jul 10 12:58:30 UTC 2007

Mike Frysinger wrote:
> On Friday 18 May 2007, Yann E. MORIN wrote:
>> So, to build a cross-toolchain with uClibc, we need, in order:
> no
> the only header that gets generated is bits/sysnum.h and the only thing that 
> uses that is syscall.h ... which gcc doesnt use, so it isnt really too much 
> of an issue ...
Hi Mike,
I'd like to come back to this issue because I've fallen in the same 
problem while trying to build from scratch
a cross gcc (for SH4).
Currently the 'headers' target cannot be used for the reason that it 
tries to compile something with a HOST compiler
using CPU_FLAGS (the same issue Yann Morin reported)
According to Paul Brook suggestion to split the 'headers' target on 
Makefile, and following your note about the pointless
generation of sysnum.h for the gcc build purpose,
I'd like to suggest  a fix into uClibc/ that consist into 
splitting the 'headers' target into three parts:

headers-sysnum  -> producing the sysnum.h

headers: creating the symlinks from include/sys include/bits to the arch 
specific header files -> This used to build gcc bootstrap

headers-extra: any other headers target (i.e. locale)

To have a uclibc-bootstrap headers just we can use (after configuring 
the uClibc)
make headers
make PREFIX=<wherever you like> install_headers

My patch is just for reference because it includes also the nptl part.
If it is ok, I can do a cleanup a post a new one synchronized with trunk.
> so the normal order is fine:
>  - build/install binutils
>  - install uClibc headers
>  - install kernel headers
>  - build C-only gcc
>  - build/install uClibc
>  - build C/C++/whatever gcc
> glibc is the same way
I had a look at the glibc and I noted that during the install-headers 
stage, glibc use the host gcc without
passing any of arch specific flags (it uses the asm_CPP macro), this is 
why it doesn't fail.
> -mike
> ------------------------------------------------------------------------
> _______________________________________________
> uClibc mailing list
> uClibc at

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: uClibc-nptl-sh4-svn_r17694_headers_bootstrap.patch

More information about the uClibc mailing list