Do not force gcc options on non-gcc compilers
fixes compile failure with pgi 18.10 as reported on OpenBLAS-users
@@ -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
