4721
Comment: packages are not signed by the keys in the keyring!
|
5006
adding new section for cross-compilers plan
|
Deletions are marked like this. | Additions are marked like this. |
Line 98: | Line 98: |
== Cross-compilers plan == === Integrate crosscompilers in Debian === * Figure 1: [[http://www.emdebian.org/~zumbi/docs/deps.pdf|Cross build visualization]] TBD === Build old style compilers === === Build sysroot compilers === === Build multiarch compilers === |
Emdebian Toolchain
Limitations
bug 504487 is affecting multilib cross toolchains and gcc-4.3 toolchains are not multilib capable. If you do not want to produce code for 32bit machines from a 64bit machine or viceversa, you do not have to worry. It might be possible to generate other ABI toolchains but we stick the more we can to Debian defaults. So, for example, mips cross compilers will default to produce O32 code.
Get the binaries
This is an active development. This page has been created to tell about latest status and what things could be done to improve Emdebian toolchain.
To use this toolchain add to your /etc/apt/sources.list or /etc/apt/sources.list.d/emdebian.sources.list:
# # -- Emdebian cross toolchains # # deb http://www.emdebian.org/debian/ unstable main # deb http://www.emdebian.org/debian/ testing main deb http://www.emdebian.org/debian/ lenny main
Search and install packages for the $ARCH that you need, for example 'armel':
$ apt-cache search armel # apt-get install libc6-armel-cross libc6-dev-armel-cross # apt-get install binutils-arm-linux-gnueabi # apt-get install gcc-4.3-arm-linux-gnueabi # apt-get install g++-4.3-arm-linux-gnueabi
Get all the libraries you need
Need to install apt-cross
apt-get install apt-cross dpkg-cross
Update
apt-cross -a $ARCH -u
Fetch your cross favorite library
apt-cross -a $ARCH -i $LIBRARY
You can also search for gdb cross package.
There is a know issue on gdb cross package.
# apt-get install gdb-arm-linux-gnu [..] dpkg: error processing /var/cache/apt/archives/gdb-arm-linux-gnu_6.8-3_i386.deb (--unpack): trying to overwrite `/usr/share/man/man1/gdb.1.gz', which is also in package gdb dpkg-deb: subprocess paste killed by signal (Broken pipe) Processing triggers for man-db ... Errors were encountered while processing: /var/cache/apt/archives/gdb-arm-linux-gnu_6.8-3_i386.deb E: Sub-process /usr/bin/dpkg returned an error code (1)
Until it gets fixed, you could work arround it with
# dpkg -i --force-overwrite \ /var/cache/apt/archives/gdb-arm-linux-gnu_6.8-3_i386.deb
Build your own from sources
Use emchain from emdebian-tools Debian package.
Emdebian.org toolchain autobuilder
Emdebian uses buildcross to build the toolchains, paamboli adds an upper layer to buildcross to do distributed building using secure shells.
Emdebian discourages to use this set of scripts to build one toolchain, as it can ruin your system if you do not have the proper set up. EmdebianToolchainAutobuilder page contains some more information on this topic.
TODO
- Improve automated builds: do automigrations
- Run testsuites on remote targets
- Add support non official Debian architectures (sh*, avr*, ...)
- Add support for eglibc and uclibc toolchains
- Add multiarch support
Using The Toolchain outside a chroot
Some people use a chroot of sid and emdebian from another debian-derivative host system. The toolchain as it is installed in the chroot is *almost* capable of being used as-is from outside.
The only problem is the symlinks pointing back/forth to /etc/alternatives (see .../usr/bin/arm-linux-gnueabi-gcc pointing eventualy to the .../usr/bin/arm-linux-gnueabi-gcc-4.3 binary) -- these are absolute path and will not work on the host. You can manualy remove these link and replace them by relative equivalents and you will get a fully working toolchain accessible from anywhere. This script might help you to pack your toolchain and relocate it as you wish (Kudos to Bus Error).
Future
- We are looking forward to support multiarch in Emdebian cross toolchains, that might break current path layouts, so we shall try to keep compatible with current cross toolchain and add an aditional multiarch toolchain.
- Current cross toolchain is compatible among other systems and non-Debian Linux based OS.
- Multiarch cross toolchain is not done yet and it might work only on Debian systems.
Cross-compilers plan
Integrate crosscompilers in Debian
Figure 1: Cross build visualization TBD
Build old style compilers
Build sysroot compilers
Build multiarch compilers