This came up recently at kerneltrap. Might be interresing to post here:
Linux: Efficient Cross Compiling
I leave it up to you to decide how useful this is within the Gentoo framework
Cheers
meowsqueak wrote:As an exercise in almost certain futility, I'm seeing how far I can get with installing Gentoo-PPC on one of our embedded ppc_860 processors. I currently have one booting off NFS with the Montavista Hardhat distribution. I untarred the Gentoo-PPC stage 2 tarball and attempted to 'chroot'. Got a few library dependency problems, which 'LD_LIBRARY_PATH=/ppc-gentoo/lib' fixed. The next message was:
# LD_LIBRARY_PATH=/ppc-gentoo/lib ./bash
./bash: /lib/ld.so.1: version `GLIBC_PRIVATE' not found (required by /ppc-gentoo/lib/libdl.so.2)
./bash: /lib/ld.so.1: version `GLIBC_PRIVATE' not found (required by /ppc-gentoo/lib/libc.so.6)
This was 'fixed' by symlinking /lib/ld.so.1 in my hardhat NFS to /gentoo/lib/ld.so.1. Unfortunately, everything I now run segmentation faults.
Hi, so I think the group I work with found the answer to this problem. The first was... did the libc version with your compiler match the target root libc version? The second issue where any application not static would seg fault turned out to be a ppc asm problem in the kernel. Guess the lesson is always know where your kernel sources come from and check the libc version when you have ld problems.
Is there any way I can work out why it's seg faulting? I'm assuming here (and it might be a fairly big assumption) that the Gentoo-PPC stage 2 tarball contains binaries that can run on the ppc_860. Anybody know for sure?
Perhaps I'd be better off installing from Stage 1? I already have a cross compiler and glibc-2.3.2 cross-compiled. I noticed a 'Stage 0' tarball on the FTP server - what's that for?
Edit: as you can see, I have no idea what I'm doing... but it's been fun thus far...