diff --git a/Makefile b/Makefile index 70d5854f8a..8a3bfd5f82 100644 --- a/Makefile +++ b/Makefile @@ -344,7 +344,7 @@ endif # AVX Backed AVX_STATUS = Disabled AVX_FLAG := $(if $(filter clang,$(CC_VENDOR)),+avx,-mavx) -AVX := $(filter $(AVX_FLAG),$(shell $(CC) $(CFLAGS) -v -E -x c /dev/null 2>&1)) +AVX := $(filter $(AVX_FLAG),$(shell $(CC) $(CFLAGS:-M%=) -v -E -x c /dev/null 2>&1)) AVX_BACKENDS = /cpu/self/avx/serial /cpu/self/avx/blocked ifneq ($(AVX),) AVX_STATUS = Enabled