===== binutils # cd build-binutils # cat a.sh BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` PREFIX=/opt/toolchain-le TARGET=ppc64le-redhat-linux-gnu ../binutils-2.24.51/configure --target=$TARGET --prefix="$PREFIX" --disable-nls --disable-werror --with-sysroot="$PREFIX" sh a.sh make make install ===== gcc core # cd build-gcc # cat a.sh BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` PREFIX=/opt/toolchain-le TARGET=ppc64le-redhat-linux-gnu #../gcc-4.8.2-20140409/configure --target=$TARGET --prefix="$PREFIX" --disable-nls \ # --enable-languages=c,c++ --without-headers --with-sysroot="$PREFIX" --disable-multilib --with-gnu-as --with-gnu-ld ../gcc-4.8.2-20140409/configure --target=$TARGET --prefix="$PREFIX" --disable-nls \ --enable-languages=c --without-headers --with-sysroot="$PREFIX" --with-gnu-as --with-gnu-ld --disable-multilib echo 'lt_cv_shlibpath_overrides_runpath=no' > config.cache echo 'gcc_cv_libc_provides_ssp=yes' >> config.cache sh a.sh make $J all-host gcc_cv_libc_provides_ssp=yes make $J install-host gcc_cv_libc_provides_ssp=yes ===== kernel headers # cat a.sh BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` PREFIX=/opt/toolchain-le ROOTFS="$PREFIX" TARGET=ppc64le-redhat-linux-gnu KERNELARGS="ARCH=powerpc CROSS_COMPILE=${TARGET}-" C=gcc make CC=$C $KERNELARGS INSTALL_HDR_PATH=$ROOTFS/usr headers_install sh a.sh ===== glibc headers [root@ibm-p750e-01-lp3 build-glibc]# cat a.sh BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` PREFIX=/opt/toolchain-le TARGET=ppc64le-redhat-linux-gnu export ARCH=powerpc export PATH=$PATH:${PREFIX}/bin export GCC_PATH=${PREFIX}/bin export CROSS_COMPILE=${TARGET}- BUILD_CC=gcc CC=${GCC_PATH}/${CROSS_COMPILE}gcc ../glibc-2.19/configure --build $BUILD \ --host $TARGET --target $TARGET --prefix=${PREFIX}/${TARGET} --disable-multilib \ --disable-profile --without-cvs --with-elf --without-gd --disable-sanity-checks \ --with-tls --with-__thread --enable-obsolete-rpc --enable-bind-now \ --without-selinux --disable-selinux --with-glibc=../glibc-2.19 make $J ARCH=powerpc cross-compiling=yes install-headers install_root=/opt/toolchain-le make $J ARCH=powerpc cross-compiling=yes install-headers install_root=/ mkdir -p /opt/toolchain-le/usr/include/gnu touch /opt/toolchain-le/usr/include/gnu/stubs.h mkdir -p /opt/toolchain-le/usr/include/bits touch /opt/toolchain-le/usr/include/bits/stdio_lim.h ===== gcc-libgcc half-broken make -k all-target-libgcc make -i install-target-libgcc ===== glibc make make install ===== gcc 2pass rm -rf /opt/toolchain-le/opt cd /opt/toolchain-le ln -s /opt opt make all-target-libgcc make install-target-libgcc make make install