Multilib/Adding new ABIs

This article aims to outline 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), abi_mips (mips).

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


 * 1) create a profiles/desc/abi_xxx.desc file for the new ABI,
 * 2) in profiles/base/make.defaults:
 * 3) add ABI_XXX (an uppercase variant of ABI group name) into USE_EXPAND,
 * 4) add ABI_XXX into USE_EXPAND_HIDDEN,
 * 5) in profiles/base/use.mask:
 * 6) mask all abi_xxx_* flags,
 * 7) in profiles/arch/* for arches involved in the multilib:
 * 8) set the default value for ABI_XXX in make.defaults,
 * 9) add the native ABI entry (abi_xxx_yyy) to use.force,
 * 10) unmask the native ABI (-abi_xxx_yyy) in use.mask,
 * 11) in profiles/arch/* for multilib profiles of the above arches:
 * 12) add -ABI_XXX to USE_EXPAND_HIDDEN in make.defaults to make the flags visible,
 * 13) unmask other supported ABIs (-abi_xxx_yyy) in use.mask.