diff options
author | Olivier Cessenat <cessenat@gmail.com> | 2022-03-16 17:34:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 12:34:58 -0400 |
commit | 9b0c2cb95453cdaf412815efe8498360b3a39bf8 (patch) | |
tree | fc3b393d8802eda7ccf7d44f5c4beb6bf7a6d33c | |
parent | ea93b1a03bd75561423b51987baf70aba9290e34 (diff) | |
download | spack-9b0c2cb95453cdaf412815efe8498360b3a39bf8.tar.gz spack-9b0c2cb95453cdaf412815efe8498360b3a39bf8.tar.bz2 spack-9b0c2cb95453cdaf412815efe8498360b3a39bf8.tar.xz spack-9b0c2cb95453cdaf412815efe8498360b3a39bf8.zip |
diffutils: work around for nvhpc not 11 compliant for __builtin_add_overflow (#28451)
-rw-r--r-- | var/spack/repos/builtin/packages/diffutils/intprops-workaround-nvc-22.1-bug.patch | 17 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/diffutils/package.py | 1 |
2 files changed, 18 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/diffutils/intprops-workaround-nvc-22.1-bug.patch b/var/spack/repos/builtin/packages/diffutils/intprops-workaround-nvc-22.1-bug.patch new file mode 100644 index 0000000000..fad04f09f8 --- /dev/null +++ b/var/spack/repos/builtin/packages/diffutils/intprops-workaround-nvc-22.1-bug.patch @@ -0,0 +1,17 @@ +diff --git a/lib/intprops.h b/lib/intprops.h +index 9d10028..1540e3e 100644 +--- a/lib/intprops.h ++++ b/lib/intprops.h +@@ -232,7 +232,11 @@ + (A, B, P) work when P is non-null. */ + /* __builtin_{add,sub}_overflow exists but is not reliable in GCC 5.x and 6.x, + see <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=98269>. */ +-#if 7 <= __GNUC__ && !defined __ICC ++#ifdef __EDG__ ++/* EDG-based compilers like nvc 22.1 cannot add 64-bit signed to unsigned ++ <https://bugs.gnu.org/53256>. */ ++# define _GL_HAS_BUILTIN_ADD_OVERFLOW 0 ++#elif 7 <= __GNUC__ && !defined __ICC + # define _GL_HAS_BUILTIN_ADD_OVERFLOW 1 + #elif defined __has_builtin + # define _GL_HAS_BUILTIN_ADD_OVERFLOW __has_builtin (__builtin_add_overflow) diff --git a/var/spack/repos/builtin/packages/diffutils/package.py b/var/spack/repos/builtin/packages/diffutils/package.py index ab33a3fdd0..31bf6b4753 100644 --- a/var/spack/repos/builtin/packages/diffutils/package.py +++ b/var/spack/repos/builtin/packages/diffutils/package.py @@ -26,6 +26,7 @@ class Diffutils(AutotoolsPackage, GNUMirrorPackage): build_directory = 'spack-build' patch('nvhpc.patch', when='@3.7 %nvhpc') + patch('intprops-workaround-nvc-22.1-bug.patch', sha256='146b7021bb0a304a3d1c0638956c4e735c2076d292d238f2806efadc972d99e5', when='@3.8 %nvhpc') conflicts('%nvhpc', when='@:3.6,3.8:') |