This is the mail archive of the mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: crossgcc for mips-redhat-linux-gnu

Toralf Lund wrote:

Chris Jones wrote:

I have a working x86 -> mipsel cross compile environment running thanks to Dan Kegel's crosstool script.

I was wondering if anyone has experience trying to cross-compile Redhat
src RPMs.

I have been trying to do the following without much luck:

rpmbuild --rebuild --target=mips-linux-gnu ./x.src.rpm

It seems that the --target flag isn't used properly when ./configure is called. Therefore we don't cross-compile.

Am I missing something from my set-up or does --target parameter in rpmbuild not actually do what I think it does?

Good question. "--target" will primarily change the way certain macros are defined, so it all depends on if and how those are accessed by the spec file... In this case, it looks like the "configure" macros from /usr/lib/rpm/macros are used, which I'd normally say is the right way to do it, but the default "platform" setup looks a bit weird. You may want to try

rpmbuild --rebuild --target=mips-linux-gnu --define "_build mips-linux-gnu" ./x.src.rpm

Or maybe it's the other way around, more or less, i.e. that you want something like

rpmbuild --rebuild --target=mips-linux-gnu --define "_host mips-linux-gnu" -define "_build i686-pc-linux-gnu" ./x.src.rpm

- Toralf

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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]