Add System-Specific CPU Flags
April 15, 2026
This is optional and probably is less necessary today than 15 years ago. GCC, for instance, generally does a great job identifying processor features and using those by default. Updating your configuration to specifically match your cpu is also pretty easy so let's get started.
emerge -av cpuid2cpuflags
cpuid2cpuflags
CPU_FLAGS_X86: aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3
Now add the results to /etc/portage/make.conf. Note the very slight format change.
/etc/portage/make.conf
...
CPU_FLAGS_X86="aes avx mmx mmxext pclmul popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3"
...
That's it. Your flags will be applied to future compilations.