From bb01e26cfea39d0952dcc467a6e399c534e7cf66 Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Fri, 29 Oct 2021 16:39:03 +0200 Subject: [PATCH] Adjust compiler options for nvidia hpc 21.9 (and fix a long-standing typo in dynamic_arch settings) --- Makefile.system | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/Makefile.system b/Makefile.system index 833511f..e76c041 100644 --- a/Makefile.system +++ b/Makefile.system @@ -104,7 +104,7 @@ GETARCH_FLAGS += -DUSER_TARGET ifeq ($(TARGET), GENERIC) ifeq ($(DYNAMIC_ARCH), 1) override NO_EXPRECISION=1 -export NO_EXPRECiSION +export NO_EXPRECISION endif endif endif @@ -905,10 +905,21 @@ PGCMINORVERSIONGE11 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0- PGCVERSIONCHECK := $(PGCVERSIONGT20)$(PGCVERSIONEQ20)$(PGCMINORVERSIONGE11) ifeq ($(PGCVERSIONCHECK), $(filter $(PGCVERSIONCHECK), 110 111 011)) NEWPGI := 1 +PGCVERSIONGT21 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \> 21) +PGCVERSIONGTEQ21 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -d "." -f 1` \>= 21) +PGCMINORVERSIONGE9 := $(shell expr `$(CC) --version|sed -n "2p" |sed -e "s/[^0-9.]//g" |cut -c 4-5` ==9) +PGCVERSIONCHECK2 := $(PGCVERSIONGT21)$(PGCVERSIONEQ21)$(PGCMINORVERSIONGE9) +ifeq ($(PGCVERSIONCHECK2), $(filter $(PGCVERSIONCHECK2), 110 111 011)) +NEWPGI2 := 1 +endif endif ifdef BINARY64 ifeq ($(ARCH), x86_64) +ifneq ($(NEWPGI2),1) CCOMMON_OPT += -tp p7-64 +else +CCOMMON_OPT += -tp px +endif ifneq ($(NEWPGI),1) CCOMMON_OPT += -D__MMX__ -Mnollvm endif @@ -923,7 +934,11 @@ endif endif endif else +ifneq ($(NEWPGI2),1) CCOMMON_OPT += -tp p7 +else +CCOMMON_OPT += -tp px +endif endif endif -- 2.7.4