Error compiling kernel with crosscompiler (unistd.h:441)

Daniel Kegel dank@kegel.com
Tue Jun 15 17:51:00 GMT 2004


Martin Egholm Nielsen wrote:
> I've just tried crosscompiling the kernel for my target - PPChameleon 
> 405EP - with my crosstool compiler in cygwin (powerpc-405-linux-gnu 
> gcc-3.4.0-glibc-2.2.5).
> The kernel fails with the following error when I try with crosstool:
> ...
> /opt/linux-2.4.20-pelk-1.2.0/include/asm/unistd.h:441: warning: 
> conflicting types for built-in function '_exit'
> /opt/linux-2.4.20-pelk-1.2.0/include/asm/unistd.h: In function `init':
> /opt/linux-2.4.20-pelk-1.2.0/include/asm/unistd.h:439: error: 
> asm-specifier for variable `__sc_4' conflicts with asm clobber list
> 
> However, when I try with ppc_4xx-gcc from DENX (ELDK 3.0) it runs 
> without any problems.
> 
> The kernel-source is one I have got from the board-supplier...

See http://gcc.gnu.org/PR9379
It looks like you may need an update to your kernel source.

See also the crosstool todo, which says

See if we need to patch kernel's asm-ppc/unistd.h
http://lists.linuxppc.org/linuxppc-embedded/200312/msg00010.html
and
http://www.geocrawler.com/archives/3/3/2002/10/0/9962740/
to fix "error: asm-specifier for variable `__sc_4' conflicts with asm clobber list"

I guess I can remove that item, since using vanilla kernel sources works
well now, but I'm glad it was there!
- Dan

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list