Multilib/Concepts

This page aims to describe the concepts used in gx86 multilib project and the rationale for them.

Multilib ABIs
Multilib ABIs are binary format 'flavours' that can be used on the same architecture. A particular ABI determines executable format, available CPU features, standard type sizes, etc.

For example, the amd64 architecture supports three multilib ABIs:


 * the native amd64 ABI that is used by the kernel and all non-multilib-capable packages,
 * the 32-bit x86 ABI that is compatible with applications and libraries written for plain x86 CPUs,
 * the x32 ABI that mostly aims to mix the advantages of amd64 ABI with 32-bit pointers.

The native ABI is the ABI that is defined as default by a particular profile. It is used for all non-multilib packages, and also enabled by default for multilib packages. The remaining ABIs are considered non-native ABIs.

Package flavours
The multilib-capable packages can be collected in two important groups:


 * library packages — packages that install both the libraries used by native ABI applications and multilib ABI applications,


 * application packages — packages that do not install public-use libraries. Since non-multilib packages don't depend on those, distinction between native ABI and non-native ABIs is not important in those packages.

Multilib ABI USE flags
Multilib-capable packages are using USE flags with abi_ prefix in order to control the enabled ABIs. The following table lists all the currently supported flags:

Availability and visibility of flags depends on the profile in use:


 * 1) in multilib profiles, the relevant flag group is made visible and supported ABIs are unmasked. The native ABI is enabled by default and forced on on most of the packages. For example, on amd64 you can notice ABI_X86 flags on a number of packages.
 * 2) in non-multilib profiles of architectures that support multilib, all the flags are hidden but the flag corresponding to the native ABI is enabled and forced to be always on. This allows packages to conveniently use the flags independently of whether multilib is enabled or not. For example, on x86 the flag abi_x86_32 is always enabled on the multilib packages.
 * 3) in profiles of architectures that do not support multilib, all multilib flags are hidden and disabled.