summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajalakshmi Srinivasaraghavan <rajis@linux.ibm.com>2020-09-04 10:36:19 -0500
committerRajalakshmi Srinivasaraghavan <rajis@linux.ibm.com>2020-09-04 10:36:19 -0500
commit718f67421aaf83fb33722e4267a2be40185f63de (patch)
treedc6e624964c3129e1615495cdbdb6c844aa90511
parentc61771e3354ce0cf86b6fec16534d61226d0151a (diff)
downloadopenblas-718f67421aaf83fb33722e4267a2be40185f63de.tar.gz
openblas-718f67421aaf83fb33722e4267a2be40185f63de.tar.bz2
openblas-718f67421aaf83fb33722e4267a2be40185f63de.zip
POWER9: Fix mcpu option with clang
Adding check for compiler type before checking GCC version in Makefile. This allows clang to use power9 instead of power8 when CORE is POWER9.
-rw-r--r--Makefile.power8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.power b/Makefile.power
index 37a02d692..e766f8499 100644
--- a/Makefile.power
+++ b/Makefile.power
@@ -17,6 +17,7 @@ endif
ifeq ($(CORE), POWER9)
ifneq ($(C_COMPILER), PGI)
CCOMMON_OPT += -Ofast -mvsx -fno-fast-math
+ifeq ($(C_COMPILER), GCC)
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
CCOMMON_OPT += -mcpu=power8 -mtune=power8
@@ -24,10 +25,14 @@ else
CCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
+CCOMMON_OPT += -mcpu=power9 -mtune=power9
+endif
+else
CCOMMON_OPT += -fast -Mvect=simd -Mcache_align
endif
ifneq ($(F_COMPILER), PGI)
FCOMMON_OPT += -O2 -frecursive -fno-fast-math
+ifeq ($(C_COMPILER), GCC)
ifneq ($(GCCVERSIONGT4), 1)
$(warning your compiler is too old to fully support POWER9, getting a newer version of gcc is recommended)
FCOMMON_OPT += -mcpu=power8 -mtune=power8
@@ -35,6 +40,9 @@ else
FCOMMON_OPT += -mcpu=power9 -mtune=power9
endif
else
+FCOMMON_OPT += -mcpu=power9 -mtune=power9
+endif
+else
FCOMMON_OPT += -O2 -Mrecursive
endif
endif