diff --git a/Makefile.x86_64 b/Makefile.x86_64 index 1b7fe3ef4..d23645058 100644 --- a/Makefile.x86_64 +++ b/Makefile.x86_64 @@ -28,11 +28,15 @@ endif ifeq ($(CORE), HASWELL) ifndef DYNAMIC_ARCH ifndef NO_AVX2 +ifeq ($(C_COMPILER), GCC) CCOMMON_OPT += -mavx2 +endif +ifeq $(F_COMPILER), GFORTRAN) FCOMMON_OPT += -mavx2 endif endif endif +endif