Here is how i did it, maybe it is useful for someone else:
TARGET="powerpc-e300c2-linux-gnu"
MY_ROOT="/usr/${TARGET}"
mkdir -p /tmp/${TARGET}
qlist --quiet --all ${TARGET} > /tmp/${TARGET}/cross-tools
ROOT=${MY_ROOT} qlist --quiet --all > /tmp/${TARGET}/pkgs
#prefix all paths with our target root prefix
sed -i s:/:${MY_ROOT}/: /tmp/${TARGET}/pkgs
tar czf /tmp/${TARGET}.tgz -T /tmp/${TARGET}/cross-tools
-T /tmp/${TARGET}/pkgs
This will create a tgz with all the binaries one need to cross compile.
Just whish I could avoid the sed stmt, but qlist can't list the ABS path(hint, hint
here is a crude ebuild, improvements welcome:
DESCRIPTION="PowerPC cross toolchain"
HOMEPAGE="http://devsrv.transmode.se/"
SRC_URI="http://devsrv.transmode.se/portage/local/distfiles/powerpc-e300c2-linux-gnu.tgz"
LICENSE="gpl"
SLOT="0"
KEYWORDS="x86 amd64"
RESTRICT="nomirror strip"
S=${WORKDIR}
src_compile() {
einfo "Nothing to compile..."
}
src_install() {
einfo "Installing..."
cp -a * "${D}" || die "Install failed"
}
prepall() {
einfo "Prepall..."
}
pkg_postinst() {
binutils-config powerpc-e300c2-linux-gnu-2.20.1
gcc-config powerpc-e300c2-linux-gnu-4.4.4
}