[Top] [All Lists]

Re: help cross-compiling MIPS-kernel on i386 linux

To: Kristoff Bonne <>,
Subject: Re: help cross-compiling MIPS-kernel on i386 linux
Date: Thu, 13 Aug 1998 02:07:29 +0200
In-reply-to: <>; from Kristoff Bonne on Wed, Aug 12, 1998 at 04:34:05PM +0200
References: <>
On Wed, Aug 12, 1998 at 04:34:05PM +0200, Kristoff Bonne wrote:

> Greetings,
> This is the first time I try to cross-compile a linux-kernel, so this may be 
> a stupid 
> question, but I'll ask it anyway.
> I've ftp'ed and installed the following files onto a (intel) linux-box:
> - linux-2.1.99.tar.gz
> - mipsel-binutils-2.8.1-linux.i386.tar.gz
> - mipsel-gcc-2.7.2-linux.i386.tar.gz
> - patch-2.1.99-pl2.tar.gz
> $ cd $home/MIPS_linux/linux
> $ make menuconfig
> $ make dep ; make clean
> $ make zImage
> And then, thing start to go wrong!
> * First of all, this:
> as: unrecognized option `-cpu=r3000'
> * This was just a warning, but then an error saying he cannot find a file 
> called 
> 'stdarg.h'.

This happens because you don't have the crossbinutils installed at all or
you have them in a place where gcc doesn't find as.

> It appears the mipsel-linux-gcc command misses a '-I' option. (-I 
> /home/kristoff/MIPS_linux/usr/local/lib/gcc-lib/mipsel-linux/2.7.2/include/)
> I don't really know what file I need to edit to include this. Some 
> 'Makefile', I 
> guess?

Seems you took the binaries and moved everything that should be in /usr/
to /home/kristoff/MIPS_linux/usr/?  That won't work, the compiler driver
mips-linux-gcc knows where it is supposed to search for the other compiler
parts - and fails.  You can force it to search in the right place by adding
the option -B<path> to the compiler flags or setting GCC_EXEC_PREFIX to
the appropriate value (see GCC documentation) but I'd rather recommend to
fix the crosscompiler installation itself.

> --- cut ---
> as: unrecognized option `-cpu=r3000'
> /home/kristoff/MIPS_linux/linux/include/asm/bugs.h: In function `check_bugs':
> In file included from init/main.c:39:
> /home/kristoff/MIPS_linux/linux/include/asm/bugs.h:43: output pipe has been 
> closed
> cpp: output pipe has been closed
> mipsel-linux-gcc: Internal compiler error: program cc1 got fatal signal 13
> --- cut ---

Signal 13 is SIGPIPE on Linux/i386, exactly what is supposed to happen in
this case ...


<Prev in Thread] Current Thread [Next in Thread>