Gx86-multilib

The gx86-multilib project aims to provide means to build Gentoo packages for multiple ABIs (multilib) and oversee the establishment of packages supporting that feature in Gentoo.

Goals
The main goal is to provide a feasible and user-friendly way of supporting applications which are not compatible with the native ABI. This mostly targets closed-source applications (such as Skype) which are not released for the native ABI/arch, applications interfacing those (such as wine) and — in specific cases — applications which are broken when compiled for the native ABI.

A side goal is to deprecate and remove the emul-linux packages, replacing them with a better solution.

The eclasses
The following eclasses are provided for multilib-related use:


 * multilib-build.eclass
 * autotools-multilib.eclass
 * multilib-minimal.eclass

The multilib-build eclass provides the raw tools to build packages with multilib support. It sets the necessary USE flags for the package and provides functions to perform the build. It shouldn't be used directly unless in very specific cases, such as meta-packages (which require USE flags only).

The autotools-multilib eclass is a very simple wrapper on top of autotools-utils.eclass. It should be used for all multilib-capable autotools packages. It uses the out-of-source build feature to support multilib builds with almost no need of modifying autotools-utils ebuilds.

The multilib-minimal eclass provides a simple, phase function-like wrapper which can be used to build the packages where no other eclass fits better.

USE flags
Multilib-capable packages have a set of abi_* USE flags that are used to request proper package variants and satisfy dependencies. To satisfy the requirement on immutability of USE flags, flags for all architectures are always defined in packages.

By default, all abi_* flags are masked and hidden. Profiles specific to the particular architecture unmask the flags and force the native flag (it is still hidden from user). Multilib profiles additionally un-hide the flags and unmask additional variants.

It is important that the native ABI flag is always enabled (forced) on the multilib libraries. This guarantees that plain (non-multilib aware) package dependencies always pull in the native variant. It is both for backwards compatibility and convenience, in order to make the multilib support transparent to non-multilib packages.