From 51ac05483d7ea13abcf7f15741a8dfababcba62b Mon Sep 17 00:00:00 2001 From: Scott McMillan Date: Wed, 7 Apr 2021 02:41:43 -0500 Subject: Update packages for NVIDIA HPC SDK 21.1 (#21975) Co-authored-by: Scott McMillan --- .../repos/builtin/packages/bison/nvhpc-3.6.patch | 38 ++++++++++++++++++++ .../repos/builtin/packages/bison/nvhpc-3.7.patch | 38 ++++++++++++++++++++ var/spack/repos/builtin/packages/bison/nvhpc.patch | 38 -------------------- var/spack/repos/builtin/packages/bison/package.py | 5 ++- var/spack/repos/builtin/packages/bzip2/package.py | 2 +- var/spack/repos/builtin/packages/ember/package.py | 2 +- .../repos/builtin/packages/gromacs/package.py | 5 ++- .../repos/builtin/packages/libpciaccess/package.py | 2 +- .../repos/builtin/packages/libtiff/package.py | 2 +- .../repos/builtin/packages/libtool/package.py | 2 +- var/spack/repos/builtin/packages/libx11/package.py | 2 +- var/spack/repos/builtin/packages/libxcb/package.py | 2 +- var/spack/repos/builtin/packages/lz4/package.py | 2 +- var/spack/repos/builtin/packages/matio/package.py | 2 +- var/spack/repos/builtin/packages/nasm/package.py | 2 +- .../repos/builtin/packages/openmpi/package.py | 4 +-- .../repos/builtin/packages/openssl/package.py | 2 +- .../repos/builtin/packages/perl/nvhpc-5.32.patch | 42 ++++++++++++++++++++++ var/spack/repos/builtin/packages/perl/package.py | 5 ++- var/spack/repos/builtin/packages/popt/package.py | 2 +- .../repos/builtin/packages/xsbench/package.py | 2 +- var/spack/repos/builtin/packages/xxhash/package.py | 3 +- 22 files changed, 147 insertions(+), 57 deletions(-) create mode 100644 var/spack/repos/builtin/packages/bison/nvhpc-3.6.patch create mode 100644 var/spack/repos/builtin/packages/bison/nvhpc-3.7.patch delete mode 100644 var/spack/repos/builtin/packages/bison/nvhpc.patch create mode 100644 var/spack/repos/builtin/packages/perl/nvhpc-5.32.patch (limited to 'var') diff --git a/var/spack/repos/builtin/packages/bison/nvhpc-3.6.patch b/var/spack/repos/builtin/packages/bison/nvhpc-3.6.patch new file mode 100644 index 0000000000..88cd8f641e --- /dev/null +++ b/var/spack/repos/builtin/packages/bison/nvhpc-3.6.patch @@ -0,0 +1,38 @@ +--- a/lib/xalloc-oversized.h 2020-08-21 13:24:01.793744123 -0700 ++++ b/lib/xalloc-oversized.h 2020-08-21 13:25:52.394097061 -0700 +@@ -41,10 +41,10 @@ + positive and N must be nonnegative. This is a macro, not a + function, so that it works correctly even when SIZE_MAX < N. */ + +-#if 7 <= __GNUC__ ++#if 7 <= __GNUC__ && !defined __NVCOMPILER + # define xalloc_oversized(n, s) \ + __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) +-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ ++#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ && !defined __NVCOMPILER + # define xalloc_oversized(n, s) \ + (__builtin_constant_p (n) && __builtin_constant_p (s) \ + ? __xalloc_oversized (n, s) \ +--- a/lib/intprops.h 2020-08-21 13:23:54.587721128 -0700 ++++ b/lib/intprops.h 2020-08-21 13:24:59.717928964 -0700 +@@ -222,9 +222,9 @@ + + /* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow + (A, B, P) work when P is non-null. */ +-#if 5 <= __GNUC__ && !defined __ICC ++#if 5 <= __GNUC__ && !defined __ICC && !defined __NVCOMPILER + # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 +-#elif defined __has_builtin ++#elif defined __has_builtin && !defined __NVCOMPILER + # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) + #else + # define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 +@@ -240,7 +240,7 @@ + + /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for + __builtin_mul_overflow_p and __builtin_mul_overflow_p. */ +-#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) ++#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__ && !defined __NVCOMPILER) + + /* The _GL*_OVERFLOW macros have the same restrictions as the + *_RANGE_OVERFLOW macros, except that they do not assume that operands diff --git a/var/spack/repos/builtin/packages/bison/nvhpc-3.7.patch b/var/spack/repos/builtin/packages/bison/nvhpc-3.7.patch new file mode 100644 index 0000000000..d678cda57e --- /dev/null +++ b/var/spack/repos/builtin/packages/bison/nvhpc-3.7.patch @@ -0,0 +1,38 @@ +--- a/lib/xalloc-oversized.h ++++ b/lib/xalloc-oversized.h +@@ -41,10 +41,10 @@ + positive and N must be nonnegative. This is a macro, not a + function, so that it works correctly even when SIZE_MAX < N. */ + +-#if 7 <= __GNUC__ && !defined __clang__ ++#if 7 <= __GNUC__ && !defined __clang__ && !defined __NVCOMPILER + # define xalloc_oversized(n, s) \ + __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) +-#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ ++#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ && !defined __NVCOMPILER + # define xalloc_oversized(n, s) \ + (__builtin_constant_p (n) && __builtin_constant_p (s) \ + ? __xalloc_oversized (n, s) \ +--- a/lib/intprops.h ++++ b/lib/intprops.h +@@ -226,9 +226,9 @@ + + /* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow + (A, B, P) work when P is non-null. */ +-#if 5 <= __GNUC__ && !defined __ICC ++#if 5 <= __GNUC__ && !defined __ICC && !defined __NVCOMPILER + # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 +-#elif defined __has_builtin ++#elif defined __has_builtin && !defined __NVCOMPILER + # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) + #else + # define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 +@@ -249,7 +249,7 @@ + presumably run afoul of Clang bug 16404. */ + # define _GL_HAS_BUILTIN_OVERFLOW_P 0 + #else +-# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) ++# define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__ && !defined __NVCOMPILER) + #endif + + /* The _GL*_OVERFLOW macros have the same restrictions as the diff --git a/var/spack/repos/builtin/packages/bison/nvhpc.patch b/var/spack/repos/builtin/packages/bison/nvhpc.patch deleted file mode 100644 index 88cd8f641e..0000000000 --- a/var/spack/repos/builtin/packages/bison/nvhpc.patch +++ /dev/null @@ -1,38 +0,0 @@ ---- a/lib/xalloc-oversized.h 2020-08-21 13:24:01.793744123 -0700 -+++ b/lib/xalloc-oversized.h 2020-08-21 13:25:52.394097061 -0700 -@@ -41,10 +41,10 @@ - positive and N must be nonnegative. This is a macro, not a - function, so that it works correctly even when SIZE_MAX < N. */ - --#if 7 <= __GNUC__ -+#if 7 <= __GNUC__ && !defined __NVCOMPILER - # define xalloc_oversized(n, s) \ - __builtin_mul_overflow_p (n, s, (__xalloc_count_type) 1) --#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ -+#elif 5 <= __GNUC__ && !defined __ICC && !__STRICT_ANSI__ && !defined __NVCOMPILER - # define xalloc_oversized(n, s) \ - (__builtin_constant_p (n) && __builtin_constant_p (s) \ - ? __xalloc_oversized (n, s) \ ---- a/lib/intprops.h 2020-08-21 13:23:54.587721128 -0700 -+++ b/lib/intprops.h 2020-08-21 13:24:59.717928964 -0700 -@@ -222,9 +222,9 @@ - - /* True if __builtin_add_overflow (A, B, P) and __builtin_sub_overflow - (A, B, P) work when P is non-null. */ --#if 5 <= __GNUC__ && !defined __ICC -+#if 5 <= __GNUC__ && !defined __ICC && !defined __NVCOMPILER - # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 --#elif defined __has_builtin -+#elif defined __has_builtin && !defined __NVCOMPILER - # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) - #else - # define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 -@@ -240,7 +240,7 @@ - - /* True if __builtin_add_overflow_p (A, B, C) works, and similarly for - __builtin_mul_overflow_p and __builtin_mul_overflow_p. */ --#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__) -+#define _GL_HAS_BUILTIN_OVERFLOW_P (7 <= __GNUC__ && !defined __NVCOMPILER) - - /* The _GL*_OVERFLOW macros have the same restrictions as the - *_RANGE_OVERFLOW macros, except that they do not assume that operands diff --git a/var/spack/repos/builtin/packages/bison/package.py b/var/spack/repos/builtin/packages/bison/package.py index b7e2be8c05..0f5a6910c8 100644 --- a/var/spack/repos/builtin/packages/bison/package.py +++ b/var/spack/repos/builtin/packages/bison/package.py @@ -51,7 +51,10 @@ class Bison(AutotoolsPackage, GNUMirrorPackage): depends_on('help2man', type='build') patch('pgi.patch', when='@3.0.4') - patch('nvhpc.patch', when='%nvhpc') + # The NVIDIA compilers do not currently support some GNU builtins. + # Detect this case and use the fallback path. + patch('nvhpc-3.6.patch', when='@3.6.0:3.6.99 %nvhpc') + patch('nvhpc-3.7.patch', when='@3.7.0:3.7.99 %nvhpc') conflicts('%intel@:14', when='@3.4.2:', msg="Intel 14 has immature C11 support") diff --git a/var/spack/repos/builtin/packages/bzip2/package.py b/var/spack/repos/builtin/packages/bzip2/package.py index f85760a01e..067a2ceadf 100644 --- a/var/spack/repos/builtin/packages/bzip2/package.py +++ b/var/spack/repos/builtin/packages/bzip2/package.py @@ -52,7 +52,7 @@ class Bzip2(Package, SourcewarePackage): ) # The Makefiles use GCC flags that are incompatible with PGI - if self.spec.satisfies('%pgi') or self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%pgi') or self.spec.satisfies('%nvhpc@:20.11'): filter_file('-Wall -Winline', '-Minform=inform', 'Makefile') filter_file('-Wall -Winline', '-Minform=inform', 'Makefile-libbz2_so') diff --git a/var/spack/repos/builtin/packages/ember/package.py b/var/spack/repos/builtin/packages/ember/package.py index d542395022..1952b18191 100644 --- a/var/spack/repos/builtin/packages/ember/package.py +++ b/var/spack/repos/builtin/packages/ember/package.py @@ -61,7 +61,7 @@ class Ember(MakefilePackage): targets = [] cc = self.spec['mpi'].mpicc cflags = '-O3' - if not self.spec.satisfies('%nvhpc'): + if not self.spec.satisfies('%nvhpc@:20.11'): cflags = '-O3 -std=c99' oshmem_cc = 'cc' oshmem_c_flags = '-O3 -g' diff --git a/var/spack/repos/builtin/packages/gromacs/package.py b/var/spack/repos/builtin/packages/gromacs/package.py index 22007dbe3a..07089af6ab 100644 --- a/var/spack/repos/builtin/packages/gromacs/package.py +++ b/var/spack/repos/builtin/packages/gromacs/package.py @@ -237,7 +237,10 @@ class Gromacs(CMakePackage): options.append('-DGMX_SIMD=AVX_128_FMA') elif 'vsx' in target: # IBM Power 7 and beyond - options.append('-DGMX_SIMD=IBM_VSX') + if self.spec.satisfies('%nvhpc'): + options.append('-DGMX_SIMD=None') + else: + options.append('-DGMX_SIMD=IBM_VSX') elif target.family == 'aarch64': # ARMv8 if self.spec.satisfies('%nvhpc'): diff --git a/var/spack/repos/builtin/packages/libpciaccess/package.py b/var/spack/repos/builtin/packages/libpciaccess/package.py index cf889de347..319da38371 100644 --- a/var/spack/repos/builtin/packages/libpciaccess/package.py +++ b/var/spack/repos/builtin/packages/libpciaccess/package.py @@ -34,7 +34,7 @@ class Libpciaccess(AutotoolsPackage, XorgPackage): def configure_args(self): config_args = [] - if (self.spec.satisfies('%nvhpc') and + if (self.spec.satisfies('%nvhpc@:20.11') and (self.spec.target.family == 'aarch64' or self.spec.target.family == 'ppc64le')): config_args.append('--disable-strict-compilation') diff --git a/var/spack/repos/builtin/packages/libtiff/package.py b/var/spack/repos/builtin/packages/libtiff/package.py index 508c24069d..5cc0c4df16 100644 --- a/var/spack/repos/builtin/packages/libtiff/package.py +++ b/var/spack/repos/builtin/packages/libtiff/package.py @@ -26,6 +26,6 @@ class Libtiff(AutotoolsPackage): def patch(self): # Remove flags not recognized by the NVIDIA compiler - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): filter_file('vl_cv_prog_cc_warnings="-Wall -W"', 'vl_cv_prog_cc_warnings="-Wall"', 'configure') diff --git a/var/spack/repos/builtin/packages/libtool/package.py b/var/spack/repos/builtin/packages/libtool/package.py index 001327c78f..bce8c932c7 100644 --- a/var/spack/repos/builtin/packages/libtool/package.py +++ b/var/spack/repos/builtin/packages/libtool/package.py @@ -55,7 +55,7 @@ class Libtool(AutotoolsPackage, GNUMirrorPackage): def patch(self): # Remove flags not recognized by the NVIDIA compiler - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): filter_file('-fno-builtin', '-Mnobuiltin', 'configure') filter_file('-fno-builtin', '-Mnobuiltin', 'libltdl/configure') diff --git a/var/spack/repos/builtin/packages/libx11/package.py b/var/spack/repos/builtin/packages/libx11/package.py index 3407f29012..1a731e40c7 100644 --- a/var/spack/repos/builtin/packages/libx11/package.py +++ b/var/spack/repos/builtin/packages/libx11/package.py @@ -33,7 +33,7 @@ class Libx11(AutotoolsPackage, XorgPackage): config_args = [] # -Werror flags are not properly interpreted by the NVIDIA compiler - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): config_args.append('--disable-selective-werror') return config_args diff --git a/var/spack/repos/builtin/packages/libxcb/package.py b/var/spack/repos/builtin/packages/libxcb/package.py index 8ebe0ac754..e6fbaf5b99 100644 --- a/var/spack/repos/builtin/packages/libxcb/package.py +++ b/var/spack/repos/builtin/packages/libxcb/package.py @@ -53,7 +53,7 @@ class Libxcb(AutotoolsPackage): config_args = [] # -Werror flags are not properly interpreted by the NVIDIA compiler - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): config_args.append('--disable-selective-werror') return config_args diff --git a/var/spack/repos/builtin/packages/lz4/package.py b/var/spack/repos/builtin/packages/lz4/package.py index a2e3db43a4..4294210ac5 100644 --- a/var/spack/repos/builtin/packages/lz4/package.py +++ b/var/spack/repos/builtin/packages/lz4/package.py @@ -51,7 +51,7 @@ class Lz4(MakefilePackage): def patch(self): # Remove flags not recognized by the NVIDIA compiler - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): filter_file('-fvisibility=hidden', '', 'Makefile') filter_file('-fvisibility=hidden', '', 'lib/Makefile') filter_file('-pedantic', '', 'Makefile') diff --git a/var/spack/repos/builtin/packages/matio/package.py b/var/spack/repos/builtin/packages/matio/package.py index 3035a24011..1ee705ceff 100644 --- a/var/spack/repos/builtin/packages/matio/package.py +++ b/var/spack/repos/builtin/packages/matio/package.py @@ -49,7 +49,7 @@ class Matio(AutotoolsPackage): return args def patch(self): - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): # workaround anonymous version tag linker error for the NVIDIA # compilers filter_file('${wl}-version-script ' diff --git a/var/spack/repos/builtin/packages/nasm/package.py b/var/spack/repos/builtin/packages/nasm/package.py index 620bae7c93..a45c02716d 100644 --- a/var/spack/repos/builtin/packages/nasm/package.py +++ b/var/spack/repos/builtin/packages/nasm/package.py @@ -29,7 +29,7 @@ class Nasm(AutotoolsPackage): def patch(self): # Remove flags not recognized by the NVIDIA compiler - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): filter_file(r'CFLAGS="\$pa_add_cflags__old_cflags -Werror=.*"', 'CFLAGS="$pa_add_cflags__old_cflags"', 'configure') filter_file(r'CFLAGS="\$pa_add_flags__old_flags -Werror=.*"', diff --git a/var/spack/repos/builtin/packages/openmpi/package.py b/var/spack/repos/builtin/packages/openmpi/package.py index e529760b26..ca58f59bad 100644 --- a/var/spack/repos/builtin/packages/openmpi/package.py +++ b/var/spack/repos/builtin/packages/openmpi/package.py @@ -173,7 +173,7 @@ class Openmpi(AutotoolsPackage): patch('nag_pthread/2.0.0_2.1.1.patch', when='@2.0.0:2.1.1%nag') patch('nag_pthread/1.10.4_1.10.999.patch', when='@1.10.4:1.10.999%nag') - patch('nvhpc-libtool.patch', when='%nvhpc@develop') + patch('nvhpc-libtool.patch', when='@develop %nvhpc') patch('nvhpc-configure.patch', when='%nvhpc') # Fix MPI_Sizeof() in the "mpi" Fortran module for compilers that do not @@ -756,7 +756,7 @@ class Openmpi(AutotoolsPackage): else: config_args.append('--without-cuda') - if spec.satisfies('%nvhpc'): + if spec.satisfies('%nvhpc@:20.11'): # Workaround compiler issues config_args.append('CFLAGS=-O1') diff --git a/var/spack/repos/builtin/packages/openssl/package.py b/var/spack/repos/builtin/packages/openssl/package.py index 75e5c22208..11c74c9b7f 100644 --- a/var/spack/repos/builtin/packages/openssl/package.py +++ b/var/spack/repos/builtin/packages/openssl/package.py @@ -114,7 +114,7 @@ class Openssl(Package): # Uses Fake Autotools, should subclass Package if spec.satisfies('@1.0'): options.append('no-krb5') # clang does not support the .arch directive in assembly files. - if 'clang' in self.compiler.cc and \ + if ('clang' in self.compiler.cc or 'nvc' in self.compiler.cc) and \ 'aarch64' in spack.architecture.sys_type(): options.append('no-asm') diff --git a/var/spack/repos/builtin/packages/perl/nvhpc-5.32.patch b/var/spack/repos/builtin/packages/perl/nvhpc-5.32.patch new file mode 100644 index 0000000000..655e560412 --- /dev/null +++ b/var/spack/repos/builtin/packages/perl/nvhpc-5.32.patch @@ -0,0 +1,42 @@ +--- a/Configure 2021-01-19 09:35:25.337234880 -0800 ++++ b/Configure 2021-01-19 09:36:43.001275967 -0800 +@@ -4979,7 +4979,7 @@ + # and usrinc directly from the compiler. + # Note that ccname for clang is also gcc. + case "$ccname" in +- gcc) ++ XXX) + $echo 'extern int foo;' > try.c + set X `$cppstdin -v try.c 2>&1 | $awk '/^#include >$Makefile <>$Makefile <<'!NO!SUBS!' + install.perl: $(INSTALL_DEPENDENCE) installperl +- $(RUN_PERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS) ++ $(MINIPERL) installperl --destdir=$(DESTDIR) $(INSTALLFLAGS) $(STRIPFLAGS) + -@test ! -s extras.lst || PATH="`pwd`:\${PATH}" PERL5LIB="`pwd`/lib" \$(RUN_PERL) -Ilib -MCPAN -e '@ARGV&&install(@ARGV)' `cat extras.lst` + + !NO!SUBS! diff --git a/var/spack/repos/builtin/packages/perl/package.py b/var/spack/repos/builtin/packages/perl/package.py index b68bc12bc6..07b452caf2 100644 --- a/var/spack/repos/builtin/packages/perl/package.py +++ b/var/spack/repos/builtin/packages/perl/package.py @@ -78,8 +78,11 @@ class Perl(Package): # Perl doesn't use Autotools, it should subclass Package patch('macos-11-version-check.patch', when='@5.24.1:5.32.0 platform=darwin') # Enable builds with the NVIDIA compiler + # The Configure script assumes some gcc specific behavior, and use + # the mini Perl environment to bootstrap installation. patch('nvhpc-5.30.patch', when='@5.30.0:5.30.99 %nvhpc') - conflicts('@5.32.0:', when='%nvhpc', + patch('nvhpc-5.32.patch', when='@5.32.0:5.32.99 %nvhpc') + conflicts('@5.32.0:', when='%nvhpc@:20.11', msg='The NVIDIA compilers are incompatible with version 5.32 and later') # Installing cpanm alongside the core makes it safe and simple for diff --git a/var/spack/repos/builtin/packages/popt/package.py b/var/spack/repos/builtin/packages/popt/package.py index 2824706299..2a28509c5b 100644 --- a/var/spack/repos/builtin/packages/popt/package.py +++ b/var/spack/repos/builtin/packages/popt/package.py @@ -18,6 +18,6 @@ class Popt(AutotoolsPackage): def patch(self): # Remove flags not recognized by the NVIDIA compilers - if self.spec.satisfies('%nvhpc'): + if self.spec.satisfies('%nvhpc@:20.11'): filter_file('CFLAGS="$CFLAGS -Wall -W"', 'CFLAGS="$CFLAGS -Wall"', 'configure', string=True) diff --git a/var/spack/repos/builtin/packages/xsbench/package.py b/var/spack/repos/builtin/packages/xsbench/package.py index da4e7263be..bccd05786d 100644 --- a/var/spack/repos/builtin/packages/xsbench/package.py +++ b/var/spack/repos/builtin/packages/xsbench/package.py @@ -41,7 +41,7 @@ class Xsbench(MakefilePackage): targets = [] cflags = '' - if not self.spec.satisfies('%nvhpc'): + if not self.spec.satisfies('%nvhpc@:20.11'): cflags = '-std=gnu99' if '+mpi' in self.spec: diff --git a/var/spack/repos/builtin/packages/xxhash/package.py b/var/spack/repos/builtin/packages/xxhash/package.py index d6549f1e47..4573ed37f8 100644 --- a/var/spack/repos/builtin/packages/xxhash/package.py +++ b/var/spack/repos/builtin/packages/xxhash/package.py @@ -32,7 +32,8 @@ class Xxhash(MakefilePackage): targets = [] if '%nvhpc' in self.spec: - targets.append('CFLAGS=-O1') + if self.spec.satisfies('%nvhpc@:20.11'): + targets.append('CFLAGS=-O1') if 'avx512' in self.spec.target: # Workaround AVX512 compiler issue -- cgit v1.2.3-70-g09d2