summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott McMillan <scott.andrew.mcmillan@gmail.com>2021-04-28 08:06:43 -0500
committerGitHub <noreply@github.com>2021-04-28 15:06:43 +0200
commitf5e6c3249500f7476bdf6015b20ec4df0612a1cd (patch)
treec69099150e16180e3f1877cfbbec79abc01a184f
parent3f4c9aeca759812e09d10c17adb43ea30e4036da (diff)
downloadspack-f5e6c3249500f7476bdf6015b20ec4df0612a1cd.tar.gz
spack-f5e6c3249500f7476bdf6015b20ec4df0612a1cd.tar.bz2
spack-f5e6c3249500f7476bdf6015b20ec4df0612a1cd.tar.xz
spack-f5e6c3249500f7476bdf6015b20ec4df0612a1cd.zip
findutils: update package for nvhpc (#23145)
Co-authored-by: Scott McMillan <smcmillan@nvidia.com>
-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'