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

Martin Egholm Nielsen
Tue Jun 15 16:09:00 GMT 2004

Hi there,

I've just tried crosscompiling the kernel for my target - PPChameleon 
405EP - with my crosstool compiler in cygwin (powerpc-405-linux-gnu 
The kernel fails with the following error when I try with crosstool:

$ make pImage
gcc -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer 
-I/opt/linux-2.4.20-pelk-1.2.0/arch/ppc -o scripts/split-include 
scripts/split-include.c scripts/split-include include/linux/autoconf.h 
powerpc-405-linux-gnu-gcc -D__KERNEL__ 
-I/opt/linux-2.4.20-pelk-1.2.0/include -Wall -Wstrict-prototypes 
-Wno-trigraphs -O2 -fno-strict-aliasing -fno-common -fomit-frame-pointer 
-I/opt/linux-2.4.20-pelk-1.2.0/arch/ppc -fsigned-char -msoft-float -pipe 
-ffixed-r2 -Wno-uninitialized -mmultiple -mstring -Wa,-m405 
-DKBUILD_BASENAME=main -c -o init/main.o init/main.c
In file included from /opt/linux-2.4.20-pelk-1.2.0/include/linux/unistd.h:9,
                  from init/main.c:17:
/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...

However, there seem to be some problems when using kernel and libraries 
compiled with DENX, and then trying to use libgcj from crosstool. I get 
some "Illegal instruction" errors sometimes, so I thought I'd try 
compiling everything with crosstool...

Best regards,
  Martin Egholm

Want more information?  See the CrossGCC FAQ,
Want to unsubscribe? Send a note to

More information about the crossgcc mailing list