OpenBricks Toolchain Overview
=============================

A toolchain is a set of tools used to compile, link, assemble ... source files into some kind of binary format that your processor can interpret. By definition, each type of architecture (x86, PowerPC, ARM ...) or processor has its specific instruction set, on top of which can also be added some extra SIMD instructions.

A toolchain is meant to compile source into a code understandable by the target CPU it'll be running on. When working with embedded devices, the target architecture is often different from the one you're currently working on (referred as host). As a result, we often speak about cross-compiler suite, as the compiling tools are meant to run on host architecture and must produced target architecture-compatible binaries.

The toolchain must contain all the necessary tools, libs and headers for building bare Linux applications. It usually consists of:

* GNU Binutils
* GNU GCC
* A C library (eglibc, glibc, uClibc ...)
* Linux kernel headers

Nearly all desktop Linux distributions are provided with their native toolchain. It's being used to compile programs for your system. Nearly none of them however comes with an available cross-toolchain.

There are many different ways to generate a cross toolchain and some specific tools exist for that purpose. All cross-toolchains are not equivalent though. They heavily vary depending on which versions of the previously mentionned tools they provide. They also can be more or less customized as to add some specific patches, fixes and optimizations for given architectures.

The OpenBricks project currently supports 2 different toolchains:

* The native *OpenBricks* toolchain.
* The external ARM toolchain from *CodeSourcery*.

The external ARM toolchain from http://www.codesourcery.com/sgpp/lite/arm/portal/subscription?@template=lite[CodeSourcery] is known to be the reference toolchain for ARM architecture. It's heavily customized and optimized to provide the best performances. It is being used by multiple projects mostly because it can be deployed and installed as it and can build pretty much everything you need. It is commercially supported, updated once a year but also often uses a bit more dated versions of each tool than the one you may find on your regular desktop distribution. You may however have some issues when using different runtime system libs than the one used at build time, as provided by the toolchain.

By opposition, the native OpenBricks toolchain is mostly up-to-date and supports a much wider set of architectures. The toolchain is actually part of our sources and dynamically built depending on the configuration options you have selected. The toolchain is a bit less performance-wide than the CodeSourcery equivalent, but is much more versatile. It can also allows you to choose which C library to use, depending on your needs. It also completely matches the runtime libraries so you really won't have any runtime surprises.

The OpenBricks toolchain is set as the default toolchain. The toolchain to be used can be selected through 'make menuconfig'. Go to _General settings / Toolchain settings / Toolchain_ and select the one you'd like to use.

// vim: set syntax=asciidoc:
