summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/findutils/nvhpc-long-width.patch17
-rw-r--r--var/spack/repos/builtin/packages/findutils/package.py6
2 files changed, 22 insertions, 1 deletions
diff --git a/var/spack/repos/builtin/packages/findutils/nvhpc-long-width.patch b/var/spack/repos/builtin/packages/findutils/nvhpc-long-width.patch
new file mode 100644
index 0000000000..0526e80f76
--- /dev/null
+++ b/var/spack/repos/builtin/packages/findutils/nvhpc-long-width.patch
@@ -0,0 +1,17 @@
+--- a/gl/lib/regex_internal.h
++++ b/gl/lib/regex_internal.h
+@@ -36,6 +36,14 @@
+ #include <intprops.h>
+ #include <verify.h>
+
++#ifndef __LONG_WIDTH__
++#if LONG_WIDTH
++#define __LONG_WIDTH__ LONG_WIDTH
++#else
++#define __LONG_WIDTH__ __WORDSIZE
++#endif
++#endif
++
+ #if defined DEBUG && DEBUG != 0
+ # include <assert.h>
+ # define DEBUG_ASSERT(x) assert (x)
diff --git a/var/spack/repos/builtin/packages/findutils/package.py b/var/spack/repos/builtin/packages/findutils/package.py
index 4244ab27f2..2fe3a21e00 100644
--- a/var/spack/repos/builtin/packages/findutils/package.py
+++ b/var/spack/repos/builtin/packages/findutils/package.py
@@ -45,7 +45,11 @@ class Findutils(AutotoolsPackage, GNUMirrorPackage):
version('4.1.20', sha256='8c5dd50a5ca54367fa186f6294b81ec7a365e36d670d9feac62227cb513e63ab')
version('4.1', sha256='487ecc0a6c8c90634a11158f360977e5ce0a9a6701502da6cb96a5a7ec143fac')
- 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.patch', when='@4.6.0 %nvhpc')
+ # Workaround bug where __LONG_WIDTH__ is not defined
+ patch('nvhpc-long-width.patch', when='@4.8.0:4.8.99 %nvhpc')
build_directory = 'spack-build'