Multilib/Adding new ABIs

This article Article description::outlines the steps necessary to add a new ABI to gx86-multilib framework.

Adding a new ABI group (arch)
Once multilib support is introduced in a new architecture (or group of architectures), a new ABI group needs to be introduced. The group name serves as the USE flag prefix and needs to be the same for all arches involved in particular multilib. Preferably, it should match the most generic name for the arch group.

Examples of ABI groups are: abi_x86 (x86 and amd64), abi_ppc (ppc and ppc64), or abi_mips (mips).

The following steps need to be taken in order to add a new ABI group:


 * 1) Create a  file for the new ABI.
 * 2) In the  file:
 * 3) Add ABI_XXX (an uppercase variant of ABI group name) into the USE_EXPAND variable.
 * 4) Add ABI_XXX into the USE_EXPAND_HIDDEN variable.
 * 5) In the  file:
 * 6) Mask all abi_xxx_* flags.
 * 7) In  for arches involved in the multilib:
 * 8) Set the default value for ABI_XXX in the  file.
 * 9) Add the native ABI entry (abi_xxx_yyy) to the  file.
 * 10) Unmask the native ABI (-abi_xxx_yyy) in the  file.
 * 11) Set the native ABI as only ABI in IUSE_IMPLICIT in the  file.
 * 12) In  for multilib profiles of the above arches:
 * 13) Add -ABI_XXX to USE_EXPAND_HIDDEN in  to make the flags visible.
 * 14) Unmask other supported ABIs (-abi_xxx_yyy) in the  file.
 * 15) In :
 * 16) Add all new ABIs to _MULTILIB_FLAGS variable.
 * 17) Add conditionals appropriate for the new ABIs to the header template in   function (it is important that the #error contains full ABI flag since the substitution relies on it).
 * 18) Add ABI->USE flag mapping to   function.

Before those changes are committed, they need to be tested and a full repoman run needs to be done in order to ensure that the new flags do not introduce dependency errors.

Adding new ABIs to existing groups
If a new ABI is to be added to an existing group, the following steps need to be taken:


 * 1) Add the new ABI to the  file.
 * 2) In
 * 3) Mask the new abi_xxx_yyy flag.
 * 4) In  for multilib profiles.
 * 5) Unmask the new ABI (-abi_xxx_yyy) in the  file.
 * 6) In the :
 * 7) Add the new ABI to the _MULTILIB_FLAGS variable.
 * 8) Add conditional appropriate for the new ABI to the header template in   function (it is important that the #error contains full ABI flag since the substitution relies on it).
 * 9) Add ABI->USE flag mapping to   function.

Before those changes are committed, they need to be tested and a full repoman run needs to be done in order to ensure that the new flag does not introduce dependency errors.