Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add nvhpc compiler support #719

Merged
merged 3 commits into from
May 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -718,7 +718,11 @@ CWARNFLAGS :=
# Disable unused function warnings and stop compiling on first error for
# all compilers that accept such options: gcc, clang, and icc.
ifneq ($(CC_VENDOR),ibm)
ifneq ($(CC_VENDOR),nvc)
CWARNFLAGS += -Wall -Wno-unused-function -Wfatal-errors
else
CWARNFLAGS += -Wall -Wno-unused-function
endif
endif

# Disable tautological comparision warnings in clang.
Expand Down
5 changes: 4 additions & 1 deletion config/generic/make_defs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,11 @@ CKVECFLAGS :=
else
ifeq ($(CC_VENDOR),clang)
CKVECFLAGS :=
ifeq ($(CC_VENDOR),nvc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a logic bug somewhere here which is breaking builds with clang.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, it's fixed now.

CKVECFLAGS :=
else
$(error gcc, icc, or clang is required for this configuration.)
$(error gcc, icc, nvc, or clang is required for this configuration.)
endif
endif
endif
endif
Expand Down
2 changes: 1 addition & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -1515,7 +1515,7 @@ get_compiler_version()
# isolate the version number.
# The last part ({ read first rest ; echo $first ; }) is a workaround
# to OS X's egrep only returning the first match.
cc_vendor=$(echo "${vendor_string}" | egrep -o 'icc|gcc|clang|emcc|pnacl|IBM|oneAPI|crosstool-NG|GCC' | { read first rest ; echo $first ; })
cc_vendor=$(echo "${vendor_string}" | egrep -o 'icc|gcc|nvc|clang|emcc|pnacl|IBM|oneAPI|crosstool-NG|GCC' | { read first rest ; echo $first ; })

# AOCC version strings contain both "clang" and "AOCC" substrings, and
# so we have perform a follow-up check to make sure cc_vendor gets set
Expand Down