Gentoo CPU flags

Gentoo Linux has USE flags that tell each program what is supported by the system.

Flags related to the processor / CPU now go in the CPU_FLAGS_X86 variable in /etc/make.conf. E.g:

CPU_FLAGS_X86=”mmx mmxext sse sse2 sse3 ssse3”

Determining CPU (CPU_FLAGS_X86) flags

The cpuinfo2cpuflags-x86 program can determine CPU flags by inspecting your /proc/cpuinfo file (which has a list of CPU flags).


emerge -1v app-portage/cpuinfo2cpuflags


me@pc ~ $ cpuinfo2cpuflags-x86
CPU_FLAGS_X86="mmx mmxext sse sse2 sse3 ssse3"

You can find a list of Gentoo’s CPU flags, along with their cpuinfo alternatives, in /usr/portage/profiles/desc/cpu_flags_x86.desc. As of 29/01/2015 these are as follows:

me@pc ~ $ cat /usr/portage/profiles/desc/cpu_flags_x86.desc
3dnow - Use the 3DNow! instruction set
3dnowext - Use the Enhanced 3DNow! instruction set
aes - Enable support for Intel's AES instruction set (AES-NI)
avx - Adds support for Advanced Vector Extensions instructions
avx2 - Adds support for Advanced Vector Extensions 2 instructions
fma3 - Use the Fused Multiply Add 3 instruction set ([fma] in cpuinfo)
fma4 - Use the Fused Multiply Add 4 instruction set
mmx - Use the MMX instruction set
mmxext - Use the Extended MMX instruction set (a subset of SSE) ([mmxext] or [sse] in cpuinfo)
padlock - Use VIA padlock instructions ([phe] in cpuinfo)
popcnt - Enable popcnt instruction support ([abm] or [popcnt] in cpuinfo)
sse - Use the SSE instruction set
sse2 - Use the SSE2 instruction set
sse3 - Use the SSE3 instruction set ([pni] in cpuinfo, NOT ssse3)
sse4_1 - Enable SSE4.1 instruction support
sse4_2 - Enable SSE4.2 instruction support
sse4a - Enable SSE4a instruction support
ssse3 - Use the SSSE3 instruction set (NOT sse3/pni)
xop - Enable the XOP instruction set

Determining additional USE flags

You may find other normal USE flags in /proc/cpuinfo:

me@pc ~/mindspill $ cat /proc/cpuinfo 
flags		: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx lm constant_tsc arch_perfmon pebs bts rep_good nopl aperfmperf pni dtes64 monitor ds_cpl vmx est tm2 ssse3 cx16 xtpr pdcm lahf_lm dtherm tpr_shadow vnmi flexpriority

This list of flags in cpuinfo contains more than can be used by Gentoo.

In fact some have a completely different meaning. For example dts means “Debug Store” or “Digital Thermal Sensor” depending on CPU, but Gentoo’s dts USE flag is to “Enable DTS Coherent Acoustics decoder support”.

You need to compare the flags in cpuinfo (e.g. see Processor Info and Feature Bits) against Gentoo’s USE Flag Index to find those that match.

I found the following:

Physical Address Extension
Advanced Configuration and Power Interface

So I make sure that they are present in my USE flags in /etc/make.conf:

USE="${USE} pae acpi"

In addition I have a multicore system (/proc/cpuinfo shows multiple processors), so I use the smp flag:

USE="${USE} smp"


Last modified: 03/08/2015 Tags:

This website is a personal resource. Nothing here is guaranteed correct or complete, so use at your own risk and try not to delete the Internet. -Stephan

Site Info

Privacy policy

Go to top