Toolchains: Difference between revisions

From Qt Wiki
Jump to navigation Jump to search
No edit summary
 
No edit summary
Line 1: Line 1:
=Toolchains=
h1. Toolchains


==Code Sourcery==
== Code Sourcery ==


For a long time Code Sourcery was the go to place for toolchains targeting embedded devices:
For a long time Code Sourcery was the go to place for toolchains targeting embedded devices:
Line 9: Line 9:
and we still cite exactly when we are testing against one of their toolchains.
and we still cite exactly when we are testing against one of their toolchains.


==Linaro==
== Linaro ==


===Overview===
=== Overview ===


In recent years Linaro have made incredibly fresh compilers available for general consumption:
In recent years Linaro have made incredibly fresh compilers available for general consumption:
Line 17: Line 17:
https://launchpad.net/linaro-toolchain-binaries/+download
https://launchpad.net/linaro-toolchain-binaries/+download


These tend to be geared towards modern devices, and unfortunately can exclude lower end targets (pre-armv7 devices) in their binary configurations. For example, they are configured to use thumb instructions out of the box, and despite the fact that you can alter the assembly generation away from these defaults, toolchain objects which contain these (illegal!) instructions are linked into the eventual binary. It such cases, it would behoove one to rolls ones own toolchain, as documented rather gloriously by the Linaro team [https://launchpadlibrarian.net/103088182/README.txt here] ''[launchpadlibrarian.net]''
These tend to be geared towards modern devices, and unfortunately can exclude lower end targets (pre-armv7 devices) in their binary configurations. For example, they are configured to use thumb instructions out of the box, and despite the fact that you can alter the assembly generation away from these defaults, toolchain objects which contain these (illegal!) instructions are linked into the eventual binary. It such cases, it would behoove one to rolls ones own toolchain, as documented rather gloriously by the Linaro team "here":https://launchpadlibrarian.net/103088182/README.txt


I will continue to grow the documentation as I comes to turns with the hairy aspects of this process. Ubuntu users might fare better by following their instructions to the T
I will continue to grow the documentation as I comes to turns with the hairy aspects of this process. Ubuntu users might fare better by following their instructions to the T


===Building the toolchain===
=== Building the toolchain ===


If you are already running Ubuntu 10.04! You are golden, and the Linaro build instructions should simply work. If you are running anything else (I run Arch) then I would recommend using debootstrap to bring up a virgin 10.04:
If you are already running Ubuntu 10.04! You are golden, and the Linaro build instructions should simply work. If you are running anything else (I run Arch) then I would recommend using debootstrap to bring up a virgin 10.04:
Line 36: Line 36:


samples/linaro-arm-linux-gnueabi/crosstool.config
samples/linaro-arm-linux-gnueabi/crosstool.config
is tailored for your needs. I, for instance, use a recipe for the Raspberry Pi that I maintain [https://gitorious.org/dcarrs-sandy-tosspot/linaro-toolchain-pi-recipe here] ''[gitorious.org]''

Revision as of 09:32, 24 February 2015

h1. Toolchains

Code Sourcery

For a long time Code Sourcery was the go to place for toolchains targeting embedded devices:

https://sourcery.mentor.com/GNUToolchain/

and we still cite exactly when we are testing against one of their toolchains.

Linaro

Overview

In recent years Linaro have made incredibly fresh compilers available for general consumption:

https://launchpad.net/linaro-toolchain-binaries/+download

These tend to be geared towards modern devices, and unfortunately can exclude lower end targets (pre-armv7 devices) in their binary configurations. For example, they are configured to use thumb instructions out of the box, and despite the fact that you can alter the assembly generation away from these defaults, toolchain objects which contain these (illegal!) instructions are linked into the eventual binary. It such cases, it would behoove one to rolls ones own toolchain, as documented rather gloriously by the Linaro team "here":https://launchpadlibrarian.net/103088182/README.txt

I will continue to grow the documentation as I comes to turns with the hairy aspects of this process. Ubuntu users might fare better by following their instructions to the T

Building the toolchain

If you are already running Ubuntu 10.04! You are golden, and the Linaro build instructions should simply work. If you are running anything else (I run Arch) then I would recommend using debootstrap to bring up a virgin 10.04:

debootstrap —variant=buildd —arch i386 lucid /opt/os/lucid http://mirror.steadfast.net/ubuntu

which you can happily expose to the build instructions above.

Once all the dependencies are present, it is only a matter of calling:

make -f contrib/linaro/build.mk

where the associated recipe:

samples/linaro-arm-linux-gnueabi/crosstool.config