[Top] [All Lists]

Re: Updates on RedHat 7.1/mips

To: Carsten Langgaard <>
Subject: Re: Updates on RedHat 7.1/mips
From: "H . J . Lu" <>
Date: Tue, 17 Jul 2001 12:29:02 -0700
Cc: Jun Sun <>,,,
In-reply-to: <>; from on Tue, Jul 17, 2001 at 09:16:05PM +0200
References: <> <> <> <> <> <> <>
User-agent: Mutt/1.2.5i
On Tue, Jul 17, 2001 at 09:16:05PM +0200, Carsten Langgaard wrote:
> Could you add a Perl rpm to you distribution, this also seems to be needed to
> build the RPMs natively.

Perl has to be built natively. I uploaded mysql-3.23.36-1.1.src.rpm,
perl-5.6.0-12.1.src.rpm, apache-1.3.19-5.src.rpm,
mod_perl-1.24_01-2.src.rpm, tcsh-6.10-5.src.rpm and
zsh-3.0.8-8.src.rpm. Just installed my RedHat 7.1. Then you can build
perl yourself. You may need to build/install the tcsh rpm first.

> I also would like to do a cross build, but how do I do that ?
> Do I have to change all the spec files, to set the target arch to MIPS, or is
> there a easier and better way to do that ?
> I guess if I just install the SRPMs and the cross toolchain, and try to build
> out of that I will simply build for the build platform, which is i386.

You need my patched `rpm' to do cross build. You also need some
specicial set up. I am enclosng a message of mine. I will see if
I can cleanup my cross build environment and upload it.

> they work great! Thanks for all your hard work. Now, I would like
> to be able to build some RPMs as well. I have never cross-built
> RPMs before. I took the SRPMS for make and tried:
>    rpm -ba make.spec --target=mipsel
> This did not do anything and built nothing. Is there a FAQ that
> I can read on cross building RPMS in addition to the documentation
> on ? Do you have any quick pointers? Thanks
> again.

Although my source rpms do support cross compile, FYI, all my
mips/mipsel rpms are cross compiled from ia32 machines, the
unpatched rpm, that is /bin/rpm, doesn't support cross compile.
In my RedHat 7.1, there are i386 rpm binaries which support
cross compile. I have a setup to cross build rpms to mips/mipsel.
Make sure your rpm sees

%__ar                   %{_target_prefix}-linux-ar
%__as                   %{_target_prefix}-linux-as
%__cc                   %{_target_prefix}-linux-gcc
%__cxx                  %{_target_prefix}-linux-c++
%__ld                   %{_target_prefix}-linux-ld
%__nm                   %{_target_prefix}-linux-nm
%__objcopy              %{_target_prefix}-linux-objcopy
%__objdump              %{_target_prefix}-linux-objdump
%__ranlib               %{_target_prefix}-linux-ranlib
%__strip                %{_target_prefix}-linux-strip

and do

# rpm --target=mips --define '_target_prefix mips'


# rpm --target=mipsel --define '_target_prefix mipsel'

BTW, you alao need to rebuild binutils with

# rpm --define 'ENABLE_ALL_TARGETS 1' -ta binutils-


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