Re: cross compiling Mozilla for Power PC
> i want to cross compile Mozilla Web-browser for Power PC on a Linux
> Machine. please tell me the Procedure and the Packages available.
Since you're no longer specifically mentioning RedHat, I assume you have
installed yourself a Debian system. So there ...
First thing you'll need is a cross compiler for PowerPC. Other ingredients
would include cross binutils, libraries for the target architecture and
extensions to the build system to add support for cross compilation.
Fortunately, a lot of this is already in place, or can be built rather
painlessly from available source.
First things first - the idea of cross compiling software for other
architectures has come up a lot, and is generally considered a bad idea.
It might be much easier to acquire a cheap PowerPC machine to build
natively. You seem intent on doing it the interesting way, though.
The cross compiler is something you need to build yourself - I haven't
seen any cross compilers for PowerPC listed in the apt-cache search
output. There's detailed instructions for building cross compilers on the
web - I'd start to search for "kegel crosstools" to find leads. AFAIR the
method described in the crosstools writeup does include building the
target arch libc as well, though I've never done that (used the cross
compiler to build kernels so I cut the build short). Target arch binutils
are also built as part of the crosstools.
If the binutils provided by the crosstool build don't work for you,
there's binutils-multiarch to try instead.
To build user space apps, you will need the complete set of libraries
your app links against, again for the target architecture (libc might
have been provided by the crosstool build as mentioned above). The
target arch's headers and libraries can be installed with the help of
dpkg-cross, so you need to install that first. dpkg-cross might be picky
about libc being absent, so you may need to fake installation of the
proper libc 'package' to shut it up. dpkg-cross also provides hooks for
dpkg-buildpackage and friends. dpkg-buildpackage is part of dpkg-dev so
get that as well.
Package building is then done by dpkg-buildpackage -b -a<target arch>. See
also /usr/share/doc/dpkg-cross/README.Debian.gz for instructions. In
particular: set CROSSPREFIX!
A word of warning: I've not actually tried cross building, except for
going through the simple motions to see the cross compiler actually gets
used. My guess is, for anything beyond trivially simple packages, cross
building is not going to work out of the box. Consider that the Debian
makefile (debian/rules) most always includes running configure to infer
features of the target architecture. Many configure tests involve
compiling test code. Some involve actually running that code, yuck. Plus
some packages run a testsuite after build - this is guaranteed to fail
mozilla doesn't count as trivially simple package. Good luck.