Toolchain

PPC64 toolchain construction

If you have any questions, please post to the linuxppc64-dev list on lists.linuxppc.org, or drop into #ppc64 on irc.freenode.net.

Option 1:

Use crosstool. This can produce separate ppc32 and ppc64 toolchains. If you install the 64-bit toolchain, you can build 64-bit vmlinux kernels. Note: if you want to build zImage kernels, you must also install the 32-bit toolchain. Having to install separate 32- and 64-bit toolchains is the primary motivation for using a bi-arch toolchain instead (see below).

If you are building userspace binaries, crosstool can produce normal dynamically-linked executables (it builds a cross-glibc as well).

wget http://kegel.com/crosstool/crosstool-0.28-rc35.tar.gz
tar -xzvf crosstool-0.28-rc35.tar.gz
cd crosstool-0.28-rc35
lynx doc/crosstool-howto.html
sudo mkdir /opt/crosstool
sudo chown $USER /opt/crosstool
sh demo-ppc970.sh
Option 2: biarch

A “biarch” compiler means a single compiler that can use either 32- or 64-bit glibc by passing either -m32 or -m64 on the commandline. To build a biarch ppc/ppc64 compiler, use these scripts. Read the README and the FAQ, edit mkbiarch.sh, and build. These scripts are under continuing development, feedback is always welcome.

Patches

Alan Modra has a number of patches for ppc64 gcc builds. They can be browsed at ftp://ftp.linuxppc64.org/pub/people/amodra/gcc-3.3/.