Nathan Coulson

Linux to Ubuntu Cross Compiler

This has been tested on Ubuntu 14.04, but should also work for debian as well. To keep it generic, I use the name x86_64-ubuntu-linux-gnu, but if you use more then one target, you can name it x86_64-ubuntu1404-linux-gnu, or any other similar variation.

Modern versions of ubuntu and debian use multiarch, where libraries can be found in /usr/lib/x86_64-linux-gnu and /usr/lib/i386-linux-gnu. Recent versions of gcc and binutils have been patched to understand this filestructure

This could potentially be done for rpm distro's as well using rpm distro's as well using febootstrap version 2

Downloads & Requiraments

Installing the sysroot

After the sysroot is created with debootstrap, it could be transferred to another pc.

Binutils

GCC

Managing the sysroot (updating and installing software

To enter the sysroot, you can use chroot /usr/x86_64-ubuntu-linux-gnu/sysroot. At this point, you can use apt-get to manage your software.

By default, only the main repository is added (without updates/security). You can add any additional repositories you desire by adding the following to /usr/x86_64-ubuntu-linux-gnu/sysroot/etc/apt