title: How to disable AVX512 and/or AVX2 in glibc at compile time?
body: <p>Recently I have upgraded to glibc 2.27, which is apparently supporting new CPU extensions like AVX2 and AVX512. String functions (memcpy, memcmp, etc) are now using those instructions. Unfortunately AVX2 and later is causing Intel CPUs to reduce clock, which based on benchmarks for application I'm working on, gives performance degradation. Is there any compilation switch to glibc where I can permanently disable selected CPU features, so that it will be limited to like normal AVX or SSE4.2?</p>