Cross-compiling support in exhereses

Overview

This document describes the design of cross-compiling support in exherbo, focussing mainly on what exheres authors should be familiar with. For background on the motivation and design consult multiarch design.

Scope

The cross compilation support in exherbo is limited to the C family of languages. That is, it does not apply to the scripting set of languages (e.g. python, Ruby, perl) which will continue to be supported by multibuild to support the multiple versions. However, this mechanism supersedes the C class of multibuild.

Terminology

This section intends to expound the terms that are used throughout this document.

Targets

Each host configuration is effectively a target. The target is specified by the canonical target triple as specified by GCC.

Currently, we support the following targets:

- i686-pc-linux-gnu
- x86_64-pc-linux-gnu
- armv7-exherbo-linux-gnueabi

Adding additional targets requires that a full system set is bootstrapped and available before we can add support for a new target.

These are also listed in the profile in CROSS_COMPILE_TARGETS.

Users can select the targets that they wish to build a package for. Any run, post, and build+run dependencies for the package must also be built for the same targets. This is necessary to provide the supporting libraries for the package.

exheres Support

Most packages are easy to update to support cross compilation. In most cases, it involves the removal of the multibuild_c option. Furthermore, any use of hardcoded paths needs to be adjusted to allow parallel installation of multiple targets.

Options

There are options set by the options.conf for the profile currently in use which can have effects on exheres.

Adding new targets

Extending support to the remaining packages requires that the profile for the host is updated to add the new target to the CROSS_COMPILE_TARGETS list in profiles/make.defaults. metadata/options/descriptions/hosts.conf should be updated with a description of the suboption. This will enable building the toolchain packages for the new target. Once the toolchain is bootstrapped, you will need to cross-compile the system stage to get proper support for the new target.

Autotools issues


Copyright 2015 Saleem Abdulrasool