Skip to content

Commit 138de3b

Browse files
authored
add nvhpc compiler support (#719)
Add detection of the NVIDIA nvhpc compiler (`nvc`) in `configure`, and adjust some warning options in `config.mk`. Currently, no specific options for `nvc` have been added in the relevant configurations so it may not be usable without further tweaks.
1 parent 0873c0f commit 138de3b

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

common.mk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,11 @@ CWARNFLAGS :=
719719
# Disable unused function warnings and stop compiling on first error for
720720
# all compilers that accept such options: gcc, clang, and icc.
721721
ifneq ($(CC_VENDOR),ibm)
722+
ifneq ($(CC_VENDOR),nvc)
722723
CWARNFLAGS += -Wall -Wno-unused-function -Wfatal-errors
724+
else
725+
CWARNFLAGS += -Wall -Wno-unused-function
726+
endif
723727
endif
724728

725729
# Disable tautological comparision warnings in clang.

config/generic/make_defs.mk

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ else
7171
ifeq ($(CC_VENDOR),clang)
7272
CKVECFLAGS :=
7373
else
74-
$(error gcc, icc, or clang is required for this configuration.)
74+
ifeq ($(CC_VENDOR),nvc)
75+
CKVECFLAGS :=
76+
else
77+
$(error gcc, icc, nvc, or clang is required for this configuration.)
78+
endif
7579
endif
7680
endif
7781
endif

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1545,7 +1545,7 @@ get_compiler_version()
15451545
# The last part ({ read first rest ; echo $first ; }) is a workaround
15461546
# to OS X's egrep only returning the first match.
15471547
cc_vendor=$(echo "${vendor_string}" |
1548-
grep -oE 'icc|gcc|clang|emcc|pnacl|IBM|oneAPI|crosstool-NG|GCC' |
1548+
grep -oE 'icc|gcc|clang|nvc|emcc|pnacl|IBM|oneAPI|crosstool-NG|GCC' |
15491549
{ read -r first rest ; echo "${first}"; })
15501550

15511551
# AOCC version strings contain both "clang" and "AOCC" substrings, and

0 commit comments

Comments
 (0)