I need to disable all AVX512 extensions in gcc-compiled code. The reason is that Valgrind chokes on AVX512 instructions. Is there a way to do it with a single flag?
I know how to disable each extension individually (-mno-avx512f
, -mno-avx512pf
etc) but this is troublesome because different gcc versions support different subsets of those.
I use CMake. If there is a way to automate the flags with CMake machinery, this would also work for me.