This shows you the differences between two versions of the page.
— | cross_compile [2014/07/10 00:30] (current) – created Jan Stancek | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | < | ||
+ | ===== binutils | ||
+ | # cd build-binutils | ||
+ | # cat a.sh | ||
+ | BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` | ||
+ | PREFIX=/ | ||
+ | TARGET=ppc64le-redhat-linux-gnu | ||
+ | |||
+ | ../ | ||
+ | |||
+ | sh a.sh | ||
+ | make | ||
+ | make install | ||
+ | |||
+ | ===== gcc core | ||
+ | |||
+ | # cd build-gcc | ||
+ | # cat a.sh | ||
+ | BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` | ||
+ | PREFIX=/ | ||
+ | TARGET=ppc64le-redhat-linux-gnu | ||
+ | |||
+ | # | ||
+ | # --enable-languages=c, | ||
+ | |||
+ | ../ | ||
+ | --enable-languages=c --without-headers --with-sysroot=" | ||
+ | |||
+ | echo ' | ||
+ | echo ' | ||
+ | |||
+ | 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=/ | ||
+ | ROOTFS=" | ||
+ | TARGET=ppc64le-redhat-linux-gnu | ||
+ | KERNELARGS=" | ||
+ | C=gcc | ||
+ | make CC=$C $KERNELARGS INSTALL_HDR_PATH=$ROOTFS/ | ||
+ | |||
+ | sh a.sh | ||
+ | |||
+ | ===== glibc headers | ||
+ | [root@ibm-p750e-01-lp3 build-glibc]# | ||
+ | BUILD=`gcc -v 2>&1 | grep Target: | sed 's/.*: //'` | ||
+ | PREFIX=/ | ||
+ | TARGET=ppc64le-redhat-linux-gnu | ||
+ | |||
+ | export ARCH=powerpc | ||
+ | export PATH=$PATH: | ||
+ | export GCC_PATH=${PREFIX}/ | ||
+ | export CROSS_COMPILE=${TARGET}- | ||
+ | |||
+ | BUILD_CC=gcc CC=${GCC_PATH}/ | ||
+ | --host $TARGET --target $TARGET --prefix=${PREFIX}/ | ||
+ | --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=../ | ||
+ | |||
+ | make $J ARCH=powerpc cross-compiling=yes install-headers install_root=/ | ||
+ | make $J ARCH=powerpc cross-compiling=yes install-headers install_root=/ | ||
+ | |||
+ | mkdir -p / | ||
+ | touch / | ||
+ | mkdir -p / | ||
+ | touch / | ||
+ | |||
+ | ===== gcc-libgcc half-broken | ||
+ | |||
+ | make -k all-target-libgcc | ||
+ | make -i install-target-libgcc | ||
+ | |||
+ | ===== glibc | ||
+ | make | ||
+ | make install | ||
+ | |||
+ | ===== gcc 2pass | ||
+ | rm -rf / | ||
+ | cd / | ||
+ | ln -s /opt opt | ||
+ | |||
+ | make all-target-libgcc | ||
+ | make install-target-libgcc | ||
+ | |||
+ | make | ||
+ | make install | ||
+ | |||
+ | </ |