From f5e6c3249500f7476bdf6015b20ec4df0612a1cd Mon Sep 17 00:00:00 2001 From: Scott McMillan Date: Wed, 28 Apr 2021 08:06:43 -0500 Subject: findutils: update package for nvhpc (#23145) Co-authored-by: Scott McMillan --- .../builtin/packages/findutils/nvhpc-long-width.patch | 17 +++++++++++++++++ var/spack/repos/builtin/packages/findutils/package.py | 6 +++++- 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 var/spack/repos/builtin/packages/findutils/nvhpc-long-width.patch 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 + #include + ++#ifndef __LONG_WIDTH__ ++#if LONG_WIDTH ++#define __LONG_WIDTH__ LONG_WIDTH ++#else ++#define __LONG_WIDTH__ __WORDSIZE ++#endif ++#endif ++ + #if defined DEBUG && DEBUG != 0 + # include + # 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' -- cgit v1.2.3-60-g2f50