Multilib/gx86-multilib

From Gentoo Wiki
Jump to: navigation, search
Warning
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-bit 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 system wide. 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 unmasking step is only required if stable arch is enabled. In other words, if the system has ACCEPT_KEYWORDS="~amd64" set in /etc/portage/make.conf file, then unmasking is not necessary.

FILE /etc/portage/profile/use.mask
-abi_x86_32

Enabling an additional ABI

It is not strictly necessary to specify the default (64-bit) ABI since it is force-enabled by 64-bit profiles, but does not hurt to add it:

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

Note on CFLAGS

For those that enable the 32-bit/64-bit ABI 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