From 6b71fea1f4173993d72af291210c2dead796f942 Mon Sep 17 00:00:00 2001 From: Dipal M Zambare Date: Mon, 5 Sep 2022 11:41:36 +0530 Subject: [PATCH] GCC 8 support for zen4 (and amdzen) configuration - Added check for GCC version 8, - Added AVX512 compiler flags needed for zen4 build using GCC 8. AMD-Internal: [CPUPL-2494] Change-Id: I7fd72e4b197fdd754633f674a8b87f01da8dd320 --- config/zen4/make_defs.mk | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/config/zen4/make_defs.mk b/config/zen4/make_defs.mk index d5d13167a..501ace287 100644 --- a/config/zen4/make_defs.mk +++ b/config/zen4/make_defs.mk @@ -86,10 +86,15 @@ ifeq ($(shell test $(GCC_VERSION) -ge 9; echo $$?),0) CKVECFLAGS += -march=znver2 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mfpmath=sse CRVECFLAGS += -march=znver2 else -# If gcc is older than 9.1.0 but at least 6.1.0, then we can use -march=znver1 +ifeq ($(shell test $(GCC_VERSION) -ge 8; echo $$?),0) +CKVECFLAGS += -march=znver1 -mavx512f -mavx512dq -mavx512bw -mavx512vl -mavx512vnni -mfpmath=sse +CRVECFLAGS += -march=znver1 +else +# If gcc is older than 8.0.0 but at least 6.1.0, then we can use -march=znver1 # as the fallback option. CKVECFLAGS += -march=znver1 -mno-avx256-split-unaligned-store CRVECFLAGS += -march=znver1 -mno-avx256-split-unaligned-store +endif # GCC 8 endif # GCC 9 endif # GCC 11 endif # GCC 12