Re: Changing topic (longish), was Re: GGI debate and etc.

Jim Nance (
Fri, 27 Feb 1998 07:40:26 -0500

On Thu, Feb 26, 1998 at 08:40:23PM +0000, John Sheehy wrote:

> > > This may be a dumb question, but this seemed like the best time to bring
> > > it up. I am wondering if there is currently a way to 'cross-compile' a
> > > kernel.

> I currently use gcc on a sparc running solaris to cross compile a kernel
> for x86 machines.
> I needed to make the following changes to the top level Makefile :
> ARCH := $(shell .....
> changed to
> ARCH := i386 ( I suppose ppc could go here )
> and the CROSS_COMPILE variable a bit further down set to
> CROSS_COMPILE = /usr/local/bin/i386-unknown-linux-

Cross compiling works well. I used to cross compile Linux/Alpha kernels
on my Digital Unix machine. You dont have to edit the Makefiles though.
The make program will let you override them from the command line. For
example, you could get the same effect as the steps list abouve by running:

make ARCH=i386 CROSS_COMPILE=/usr/local/bin/i386-unknown-linux-

I have also found that sometimes it helps to set BASH=/path/to/bash if
you have problems running make config.

Hope this helps,


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to