From ebe50458f3ead5aa4ed053bbb7c3b2d60a9d698d Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Thu, 9 Feb 2023 09:29:27 +0100 Subject: [PATCH] Do not add a -tp to the flags of the nvc compiler if there is one already in CFLAGS --- Makefile.system | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Makefile.system b/Makefile.system index 6e98b3fc8..343b94bb3 100644 --- a/Makefile.system +++ b/Makefile.system @@ -968,16 +968,19 @@ endif endif ifdef BINARY64 ifeq ($(ARCH), x86_64) +ifeq (,$(findstring tp,$(CFLAGS))) ifneq ($(NEWPGI2),1) CCOMMON_OPT += -tp p7-64 else CCOMMON_OPT += -tp px endif +endif ifneq ($(NEWPGI),1) CCOMMON_OPT += -D__MMX__ -Mnollvm endif else ifeq ($(ARCH), power) +ifeq (,$(findstring tp,$(CFLAGS))) ifeq ($(CORE), POWER8) CCOMMON_OPT += -tp pwr8 endif @@ -986,14 +989,17 @@ CCOMMON_OPT += -tp pwr9 endif endif endif +endif else ifneq ($(NEWPGI2),1) +ifeq (,$(findstring tp,$(CFLAGS))) CCOMMON_OPT += -tp p7 else CCOMMON_OPT += -tp px endif endif endif +endif ifeq ($(C_COMPILER), PATHSCALE) ifdef BINARY64