[Top] [All Lists]

Re: Cross compiling RPMs

To: Mike McDonald <>
Subject: Re: Cross compiling RPMs
From: Pete Popov <>
Date: Fri, 26 Jan 2001 11:39:17 -0800
Organization: Monta Vista Software
References: <>
Mike McDonald wrote:
> >Date: Fri, 26 Jan 2001 10:37:03 -0800
> >From: Pete Popov <>
> >To: Mike McDonald <>
> >Subject: Re: Cross compiling RPMs
> >To start with, you'll need a cross tool chain setup properly with the
> >headers and libraries.  One option is
> > You can grab everything (the
> >entire root fs) or just the tools: binutils, gcc, kernel headers,
> >glibc.  Others might have similar toolchains they can point you at.
> >Another option is native builds, which I personally don't like.
> >
> >Pete
>   I have a working tool chain that I use to cross compile a kernel
> with sources from. How do I convince rpm to use that chain?

Is that tool chain setup to compile userland apps? Can you cross compile


int main()
    printf("hello world\n");

with a command such as "mips_fp_le-gcc -o hello hello.c" and get a
little endian mips binary that runs on your system?  

If so, then you need to modify the .spec file for the given rpm to pick
up the right tool chain, ... and you'll probably need to add macro files
that rpm picks up so  that you can do something like:

rpm -ba --target=xxxxx <spec file>

it works.

That's easier said than done.  I wouldn't know how to do it myself --
someone else has done it for me here.


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