Gentoo Crossdev

Gentoo has a frontend tool for emerging cross-compiling toolchains. Simply put, this allows you to emerge a cross-compiler toolchain with one command.

First, emerge crossdev:

$ emerge crossdev

Then tell it to emerge a SH4 toolchain:

$ crossdev -t sh4

Once this has finished, you should have a full C/C++ cross-compiler for the SH4 cpu. If you just want a cross-compiler to build a kernel, you can save yourself sometime:

$ crossdev -t sh4 -s1

This will install just a C compiler (no libc) so you can build kernels (and not much else).

$ sh4-unknown-linux-gnu-gcc --help

By default, crossdev will pick a glibc based toolchain. If you wish to utilize uClibc, you need to provide some more info:

$ crossdev -t sh4-pc-linux-uclibc

Then you have access to it with a simple:

$ sh4-pc-linux-uclibc-gcc --help

For more info, just run:

$ crossdev --help

last edited 2005-06-02 12:59:26 by PaulMundt