summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/m4/nvhpc-1.4.19.patch
diff options
context:
space:
mode:
Diffstat (limited to 'var/spack/repos/builtin/packages/m4/nvhpc-1.4.19.patch')
-rw-r--r--var/spack/repos/builtin/packages/m4/nvhpc-1.4.19.patch14
1 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/m4/nvhpc-1.4.19.patch b/var/spack/repos/builtin/packages/m4/nvhpc-1.4.19.patch
new file mode 100644
index 0000000000..ee9398b3bb
--- /dev/null
+++ b/var/spack/repos/builtin/packages/m4/nvhpc-1.4.19.patch
@@ -0,0 +1,14 @@
+--- a/lib/intprops.h
++++ b/lib/intprops.h
+@@ -232,9 +232,9 @@
+ (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
++#if 7 <= __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