From 8e8651f0a5b2fa74245893f445d1ec803f2d523b Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 2 Feb 2023 18:13:29 +0100 Subject: [PATCH] Supply necessary gcc option for AVX512-capable Ryzens --- Makefile.x86_64 | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/Makefile.x86_64 b/Makefile.x86_64 index d5e9cbfc7..7ab331b1f 100644 --- a/Makefile.x86_64 +++ b/Makefile.x86_64 @@ -130,6 +130,28 @@ endif endif endif +ifeq ($(CORE), ZEN) +ifdef HAVE_AVX512VL +ifndef NO_AVX512 +CCOMMON_OPT += -march=skylake-avx512 +ifneq ($(F_COMPILER), NAG) +FCOMMON_OPT += -march=skylake-avx512 +endif +ifeq ($(OSNAME), CYGWIN_NT) +CCOMMON_OPT += -fno-asynchronous-unwind-tables +FCOMMON_OPT += -fno-asynchronous-unwind-tables +endif +ifeq ($(OSNAME), WINNT) +ifeq ($(C_COMPILER), GCC) +CCOMMON_OPT += -fno-asynchronous-unwind-tables +FCOMMON_OPT += -fno-asynchronous-unwind-tables +endif +endif +endif +endif +endif + + ifdef HAVE_AVX2 ifndef NO_AVX2 ifeq ($(C_COMPILER), GCC)