linux-mips
[Top] [All Lists]

Re: Cross compiling RPMs

To: Mike McDonald <mikemac@mikemac.com>
Subject: Re: Cross compiling RPMs
From: Pete Popov <ppopov@mvista.com>
Date: Fri, 26 Jan 2001 11:39:17 -0800
Cc: linux-mips@oss.sgi.com
Organization: Monta Vista Software
References: <200101261927.LAA09872@saturn.mikemac.com>
Sender: owner-linux-mips@oss.sgi.com
Mike McDonald wrote:
> 
> >Date: Fri, 26 Jan 2001 10:37:03 -0800
> >From: Pete Popov <ppopov@mvista.com>
> >To: Mike McDonald <mikemac@mikemac.com>
> >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
> >ftp.mvista.com:/pub/Area51/mips_fp_le. 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
this:

hello.c:

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.

Pete

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