Translations of this page?:

Setting up and using a cross compiler to generate code for the Gdium

Host=x86, Target=Gdium

Overview

A cross-compiler is a compiler that creates code for a machine with an architecture different than the machine used for compiling programs.

The target of this scenario, is to use an x86 Linux box to compile programs, since many of our x86 desktops and server are much faster, and have more resources (disk, memory, etc) than the gdium.

Environment

First, a good stable environment is desired for cross-compiling. We will use a chroot environment for this purpose. While it is not an absolute requirement to use a chroot environment, it is highly recommended, as once built, they can be easily rebuilt, and provide a high degree of stability.

Most likely, the environment under your chroot will be the same as the host OS.

If you are using Debian in your host environment, you can apt-get the chroot tools to make a Debian chroot environment. You can also use the mach, for make a chroot, to create a rpm based chroot environment under Debian.

If you are using Fedora, RHEL/CentOS or other rpm based distros, you can use the mock build system, which creates a chroot environment and can re/build rpms, even for different architectures.

In our examples, we will use mock. See The mock build system for details on how to set up and use mock on your own system.


Personal Tools