From Gentoo Wiki
Jump to: navigation, search
This page describes an experimental feature in Gentoo, which may change significantly or be removed entirely in the future.

This page will use amd64 with the additional "32" API for illustration, users of other multilib-enabled arches should adapt the instructions accordingly.

Due to limitations in the older emul-linux-x86-* multilib solution, it is generally troublesome to toggle eclass based multilib on individual packages. Thus, this page currently only describes how to enable it systemwide. These difficulties are expected to lessen as more of the packages provided by the emul-linux-x86-* packages are migrated to use eclass based multilib, and other packages are updated to accept the migrated packages in their dependencies.

Enabling eclass based multilib

Unmask required use flags

This step is only required if you run a stable arch, eg. do not have ACCEPT_KEYWORDS=~amd64 in make.conf
FILE /etc/portage/profile/use.mask

Enabling additional ABIs

FILE /etc/portage/make.conf
ABI_X86="32 64"

It is not strictly necessary to specify the default ("64") an ABI, since it is force-enabled by the profiles.

Note on CFLAGS

For those that enable this ABI 32,64 your CFLAGS options must "NOT" include any -mXX options.

FILE /etc/portage/make.conf
#Remove -m32 -m64 flags that conflict with multilib ABI settings
#CFLAGS="-O2 -march=native -pipe -m32 -m64"

CFLAGS="-O2 -march=native -pipe"

This will allow the ABI_X86="32 64" to select the compiler options during the configure and make process.

See also

External links