From 471e57ecd33abbc41b6b387617332f78e42e9af4 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 21 Sep 2019 13:32:00 +0200 Subject: [PATCH] Exclude POWER9 from DYNAMIC_ARCH when gcc versions is lower than 6 --- Makefile.system | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Makefile.system b/Makefile.system index 2cf1322a9..9cacf11b9 100644 --- a/Makefile.system +++ b/Makefile.system @@ -322,12 +322,13 @@ CCOMMON_OPT += -DMS_ABI endif ifeq ($(C_COMPILER), GCC) -#Test for supporting MS_ABI +#Version tests for supporting specific features (MS_ABI, POWER9 intrinsics) GCCVERSIONGTEQ4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \>= 4) GCCVERSIONGT4 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 4) +GCCVERSIONGT5 := $(shell expr `$(CC) -dumpversion | cut -f1 -d.` \> 5) GCCMINORVERSIONGTEQ7 := $(shell expr `$(CC) -dumpversion | cut -f2 -d.` \>= 7) ifeq ($(GCCVERSIONGT4), 1) -# GCC Majar version > 4 +# GCC Major version > 4 # It is compatible with MSVC ABI. CCOMMON_OPT += -DMS_ABI endif @@ -554,8 +555,16 @@ endif ifeq ($(ARCH), power) DYNAMIC_CORE = POWER6 DYNAMIC_CORE += POWER8 +ifneq ($(C_COMPILER), GCC) DYNAMIC_CORE += POWER9 endif +ifeq ($(C_COMPILER), GCC) +ifeq ($(GCCVERSIONGT5), 1) +DYNAMIC_CORE += POWER9 +else +$(info, OpenBLAS: Your gcc version is too old to build the POWER9 kernels.) +endif +endif # If DYNAMIC_CORE is not set, DYNAMIC_ARCH cannot do anything, so force it to empty ifndef DYNAMIC_CORE