This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Howto Cross Compile GCC to run on PPC Platform
- From: Kai Ruottu <karuottu at mbnet dot fi>
- To: Jeff Stevens <jsteve17 at yahoo dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 03 Nov 2005 18:38:05 +0200
- Subject: Re: Howto Cross Compile GCC to run on PPC Platform
- References: <20051103151608.82370.qmail@web33411.mail.mud.yahoo.com>
- Reply-to: karuottu at mbnet dot fi
Jeff Stevens wrote:
I am creating the target tree on my host, so that I
can later transfer it to a USB storage device. I was
going to manually move everything, but only saw one
binary, xgcc. Is that all, or aren't there some other
utilities that go along with it?
The 'cpp', 'cc1*', 'collect2', 'g++',... BUT your stuff
is not a 'normal' native GCC... The '--prefix=/usr' is
the normal setting for that. So probably you must make
distclean, reconfigure and rebuild the GCC for the normal
native system...
> I just didn't know
exactly what to copy and where to copy it to. When I
built glibc, those were built for the target system,
but installed to the target directory structure that I
am creating.
The 'make install' command that I ran for glibc was:
make install_root=${TARGET_PREFIX} prefix="" install
where TARGET_PREFIX is the target filesystem tree. I
used the same make install command for the native gcc
that I compiled.
The install command for GCC is :
make DESTDIR=$SYSROOT install
and found via the RTFM method... Building GCC should
mean producing binaries and documents, not only the
first. But maybe I'm alone with this opinion and the
only one ever using 'pdftex' etc. document tools...
With the glibc configure you of course used the same
'--prefix=/usr' or how? The native GCC and glibc normally
use that but the 'make install' has those 'install_root='
and 'DESTDIR=' options for installing into the $SYSROOT.
Why you used '${TARGET_PREFIX}' as your '$SYSROOT', is
a little odd, but I don't know about those LFS (Linux
From Scratch) oddities anything, maybe the book writer
didn't know so well :-) Maybe it suggests producing glibc
twice, once for the crosstools, once for the target system,
which of course is some kind of "bullying", doing it once
and for the target system of course is enough... The same
glibc works also on the cross-host, installed into the
target root directories... The '--with-sysroot=' or simple
symlinks to the '$(tooldir)' let it being used with a cross-
compiler... A already built glibc taken from an existing
Linux target of course must be installed somehow for an
usual crosscompiler for some Linux distro.