vm-larix‎ > ‎


Compiling a GCC toolchain for ARM

To compile our operating system, we need to have a cross-compiler for the target platform arm-elf- and arm-none-gnueabi or arm-linux-gnueabi-. ELF is Executable and Linkable Format. EABI is Embedded Application Binary Interface.

A tool chain to develop for the ARM platform would include
A script to download, build and install this toolchain can be found at Dr. Pyeatt's Operating Systems Course Page. However, this script might be out of date. It is recommended that one visits the pages of the respective tools and update the scripts with the latest version numbers before running them. Be assured, These will not run right out of the box. You are certainly going to run into a lot of library not found issues while you attempt to build the tool chain. The severity of the issue is dependent on the distribution of Linux that you are using. Ubuntu Netbook remix needed the maximum number cycles of download library - rerun script. While Slackware had a fewer of these. This is not surprising considering the fact that Ubuntu editions are ~600MB while Slackware 13.1 iso image is ~4.1 GB. These were the only two distributions that I had tried compiling on.

All of these tools are compiled for the TARGET=arm-elf.

The same script may be modified and rerun with TARGET=arm-none-eabi. If you are using Dr. Pyeatt's script, make sure to delete the success files before re-running the script.

Solutions to errors that I faced

Libraries needed


Cannot compute the suffix of library

This error popped up during the make and was resolved by setting the environment variable $LD_LIBRARY_PATH to point to the gmp, mpc, mpfr library. In my case, /usr/local/lib/. Or better still, append this part in the script that is building the tool-chain and is also used during compilation of other programs. This better go into the .bashrc or .bash_profile

Subpages (1): Testing GCC