Open tpgxyz opened 3 years ago
Nope, not working that way.
If you want to go with that you need a glibc with glibc-hwcaps support for whatever you want supporting. That means also you have to compile multiple sets of the same SW and find a way to restrict usage on other CPUs.
EG: a CPU which lacks AVX, SSE3/4 support is broken if you force those compiler flags by default.
If you just enable v2 by default, which enables sse3/sse4 etc you break the crap out of any older still supported 64bit CPUs.
-march=x86_64-v2 does break CPUs that don't have the needed features -- and I think quite a few people are still using those (remember how things started to break for people when mesa was accidentally compiled with SSE3?)
But of course there's things we can do, e.g. drop znver1 for x86_64-v3 or so.
x86-64-v2 is supported by Intel Nehalem released in 2008. More infor here https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels GCC and LLVM already support it.