This is Gentoo's testing wiki. It is a non-operational environment and its textual content is outdated.
Please visit our production wiki at https://wiki.gentoo.org
CPU_FLAGS_X86
CPU_FLAGS_X86 is an USE_EXPAND variable containing instruction set and other CPU-specific features.
Previous USE flags corresponding to the instruction sets and other features specific to the x86/amd64 architecture are being moved into a separate USE_EXPAND variable called CPU_FLAGS_X86.
Installation
Emerge
root #
emerge --ask app-portage/cpuid2cpuflags
Configuration
Optimization
In order not to lose CPU-specific optimizations, users will be required to update the make.conf (and potentially package.use) file. For example, if the following USE flags were present:
/etc/portage/make.conf
USE="mmx mmxext sse sse2 sse3"
Those flags need to be copied to a newly created CPU_FLAGS_X86 variable:
/etc/portage/make.conf
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3"
The same CPU_FLAGS_X86 variable is used both on x86 and amd64 architectures on Intel and AMD CPUs.
When in doubt, consult the flag descriptions using one of the commonly available tools, e.g. equery uses from app-portage/gentoolkit:
user $
equery uses media-video/ffmpeg
Most of the flag names match /proc/cpuinfo names, with the notable exception of sse3
which is called pni
in /proc/cpuinfo (please also do not confuse it with distinct ssse3
).
To help users enable the correct USE flags, a Python script is provided that generates the correct value using /proc/cpuinfo. It can be found in the app-portage/cpuid2cpuflags package.
Saving deprecated USE flags
In order to ensure safe migration and maintain compatibility with external repositories, it is recommended to preserve the old USE settings for a period of one year or until no package of interest is still using them.
Usage
Invocation
Version 1 or 2:
user $
cpuinfo2cpuflags-x86
Version 3 or greater:
user $
cpuid2cpuflags
Example to apply globally:
root #
echo "*/* $(cpuid2cpuflags)" > /etc/portage/package.use/00cpu-flags
See also
External resources
- https://packages.gentoo.org/useflags/search?q=cpu_flags_x86 - A online package search for all packages that make use of CPU_FLAGS_X86 values.