Cross-compiler binaries

Introduction

If you're working on a project such as the Linux kernel, which must compile for several different architectures, it can be very handy to have a set of cross-compilers to test your changes with. Frequently, seemingly trivial changes such as moving a definition from a header file to another will break the build for other architectures than the one you are primarily working on.

Crosstool is a set of scripts that will help you build cross-compilers for various target architectures. Unfortunately, building a single cross-compiler can take a rather long time. And when you want to build for all the architectures that the Linux kernel supports, it takes a very long time (and quite a bit of effort). Therefore, we here provide a repository of pre-compiled binaries.

The repository

The repository organized as follows:

Host-arch is the architecture you are running the cross-compiler on, while target-arch is the architecture you want to cross-compile for.

X.Y.Z and U.V.W represent respectively GCC and GNU libc version triplests.

The .asc files are signature files which may be used in conjunction with my PGP public key to verify that the file indeed came from me. Quick reference:

Using the cross-compilers

Each file will unpack to a directory of the structure gcc-x.y.z-glibc-u.v.w/arch-unknown-linux-gnu/. Inside, there will be a bin/ directory. Point your $PATH variable to this, and you will be able to run the compiler using arch-unknown-linux-gnu-gcc.

In addition, for cross-compiling the Linux Kernel, I have a small script for each architecture, looking something like this:

#! /bin/bash

PATH="/home/vegard/crosstool/gcc-3.4.5-glibc-2.3.6/x86_64-unknown-linux-gnu/bin/:$PATH" make ARCH=x86_64 CROSS_COMPILE=x86_64-unknown-linux-gnu- $@

Now I can simply run ./make-x86_64 menuconfig, etc.

Legal + source code

GCC, binutils, and GNU libc are all open source programs released under the GPL license (read license). By the GPL, we are obliged to also provide the source code for the binary packages offered here. (Note that these can also be downloaded from their respective GNU websites.)

Misc.

This particular project was started in April 2008, though there have been a few predecessors, such as Andrew Morton's cross-compilers. I hope to be able to provide better support and cross-compilers that run on several different host architectures as well.

In order to compile the compilers and create the tarballs, I use (apart from crosstool) my own set of shell scripts.

If there are any problems (.tar.gz is really a .tar.bz2, the compiler mis-compiles your kernel, etc.), please do contact Vegard Nossum <vegard@kernel.org>. I also take other feedback, such as comments, improvement suggestions, requests for specific GCC versions, etc.