| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 | // -*- mode:doc; -*-// vim: set syntax=asciidoc:[[toolchain]]Cross-compilation toolchain---------------------------A compilation toolchain is the set of tools that allows you to compilecode for your system. It consists of a compiler (in our case, +gcc+),binary utils like assembler and linker (in our case, +binutils+) and aC standard library (eitherhttp://www.gnu.org/software/libc/libc.html[GNU Libc],http://www.uclibc.org/[uClibc] orhttp://www.musl-libc.org/[musl]).The system installed on your development station certainly already hasa compilation toolchain that you can use to compile an applicationthat runs on your system. If you're using a PC, your compilationtoolchain runs on an x86 processor and generates code for an x86processor. Under most Linux systems, the compilation toolchain usesthe GNU libc (glibc) as the C standard library. This compilationtoolchain is called the "host compilation toolchain". The machine onwhich it is running, and on which you're working, is called the "hostsystem" footnote:[This terminology differs from what is used by GNUconfigure, where the host is the machine on which the application willrun (which is usually the same as target)].The compilation toolchain is provided by your distribution, andOpenADK has nothing to do with it (other than using it to build across-compilation toolchain and other tools that are run on thedevelopment host).As said above, the compilation toolchain that comes with your systemruns on and generates code for the processor in your host system. Asyour embedded system has a different processor, you need across-compilation toolchain - a compilation toolchain that runs onyour _host system_ but generates code for your _target system_ (andtarget processor). For example, if your host system uses x86 and yourtarget system uses ARM, the regular compilation toolchain on your hostruns on x86 and generates code for x86, while the cross-compilationtoolchain runs on x86 and generates code for ARM.OpenADK provides only one solution for the cross-compilation toolchain.The versions for binutils, gcc, gdb and libc are fixed. It is a combinationof mostly the latest versions, which are known to work in this combinationand are known to produce usable firmware images. You normally do not need toknow the deep details, it is part of OpenADK policy to keep this partsimple for the user.You can only choose between three C libraries:http://www.uclibc.org[uClibc], thehttp://www.gnu.org/software/libc/libc.html[glibc] andhttp://www.musl-libc.org[musl].There are some minimal configuration options provided in +Toolchain settings+.You can enable or disable the building of following components and toolchainoptions:* GDB (enabled by default)* GNU C++ compiler (enabled by default, when disabled   will prevent some packages to show up in the menu selection)* Stack Smashing Support (SSP) support for GNU C/C++ Compiler (experimental, some packages will fail to build)* Link Time Optimization (LTO) support for GNU C/C++ Compiler (experimental, some packages will fail to build)
 |