crossgcc for mips-redhat-linux-gnu

Toralf Lund toralf@procaptura.com
Thu Mar 18 12:51:00 GMT 2004


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


>Output follows.
>  
>
>Thanks,
>
>   Chris
>
>Building target platforms: mips-linux
>Building for target mips-linux
>Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.84947
>+ umask 022
>+ cd /home/cjones/rpm/BUILD
>+ cd /home/cjones/rpm/BUILD
>                                                                                
><SNIP>
>                                                                                
>+ ./configure --host=i686-pc-linux-gnu --build=i686-pc-linux-gnu
>--target=mips-redhat-linux-gnu --program-prefix= --prefix=/usr
>--exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin
>--sysconfdir=/usr/etc --datadir=/usr/share --includedir=/usr/include
>--libdir=/usr/lib --libexecdir=/usr/libexec --localstatedir=/usr/var
>--sharedstatedir=/usr/com --mandir=/usr/man --infodir=/usr/info
>--libdir=/lib --libexecdir=/usr/lib
>
>checking for i686-pc-linux-gnu-gcc... no
>checking for gcc... gcc
>checking for C compiler default output... a.out
>checking whether the C compiler works... yes
>checking whether we are cross compiling... no
>checking for suffix of executables...
>checking for suffix of object files... o
>
>...
>
>  
>


-- 
Toralf Lund <toralf@procaptura.com> +47 66 85 51 22
ProCaptura AS                       +47 66 85 51 00 (switchboard)
http://www.procaptura.com/~toralf   +47 66 85 51 01 (fax)


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list