summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorSimon Bolding <60368867+sbolding-LANL@users.noreply.github.com>2021-04-01 17:15:25 -0600
committerGitHub <noreply@github.com>2021-04-01 23:15:25 +0000
commit9c139bf7a2f3041f978d9a86cb25ff3f092556b5 (patch)
treecab392d42e1a4dc23b9c95095f750b7420d5cfe1 /var
parent2ae7e2550175fb6decfc9bc9d4af5c47b881413e (diff)
downloadspack-9c139bf7a2f3041f978d9a86cb25ff3f092556b5.tar.gz
spack-9c139bf7a2f3041f978d9a86cb25ff3f092556b5.tar.bz2
spack-9c139bf7a2f3041f978d9a86cb25ff3f092556b5.tar.xz
spack-9c139bf7a2f3041f978d9a86cb25ff3f092556b5.zip
mpark-variant: ICC Patch (#22727)
* Add patch for Intel C++ compiler - On some machines (in particular MacOSX Catalina), the icpc in some way utilizes the preprocessor of the associated "developer tools" used by icpc. This leads to, in some cases, a preprocessor claiming support for __tuple_element_packs, even though icpc (as of version 21.1) can't actually parse such code. Just use the MPARK_TUPLE_ELEMENT_PACK impl with __icc until icpc supports it, to avoid issues with developer tools that are untested. - The same patch has been PRed against mpark-variant
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/mpark-variant/icpc.patch33
-rw-r--r--var/spack/repos/builtin/packages/mpark-variant/package.py3
2 files changed, 36 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/mpark-variant/icpc.patch b/var/spack/repos/builtin/packages/mpark-variant/icpc.patch
new file mode 100644
index 0000000000..a155f2fa59
--- /dev/null
+++ b/var/spack/repos/builtin/packages/mpark-variant/icpc.patch
@@ -0,0 +1,33 @@
+From 2d933fe544bd5841e9016ab7e8066521ebe33f30 Mon Sep 17 00:00:00 2001
+From: sbolding <sbolding@lanl.gov>
+Date: Mon, 29 Mar 2021 19:13:28 -0600
+Subject: [PATCH] Apply patch for icpc
+
+icpc in some way utilizes the preprocessor of the associated "developer
+tools" used by the compiler. This leads to, in some cases, a
+preprocessor claiming support for `__tuple_element_packs`, even though
+icpc (as of version 21.1) can't actually parse such code. Just use the
+MPARK_TUPLE_ELEMENT_PACK impl with __icc until icpc supports it.
+
+Fixes #77
+---
+ include/mpark/config.hpp | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/include/mpark/config.hpp b/include/mpark/config.hpp
+index f85ffb55c..128fa9235 100644
+--- a/include/mpark/config.hpp
++++ b/include/mpark/config.hpp
+@@ -50,7 +50,7 @@
+ #define MPARK_BUILTIN_UNREACHABLE
+ #endif
+
+-#if __has_builtin(__type_pack_element)
++#if __has_builtin(__type_pack_element) && !(defined(__ICC))
+ #define MPARK_TYPE_PACK_ELEMENT
+ #endif
+
+--
+2.24.3 (Apple Git-128)
+
+
diff --git a/var/spack/repos/builtin/packages/mpark-variant/package.py b/var/spack/repos/builtin/packages/mpark-variant/package.py
index 72bcc306da..b18b54e635 100644
--- a/var/spack/repos/builtin/packages/mpark-variant/package.py
+++ b/var/spack/repos/builtin/packages/mpark-variant/package.py
@@ -19,7 +19,10 @@ class MparkVariant(CMakePackage):
# Ref.: https://github.com/mpark/variant/pull/73
patch('nvcc.patch', when='@:1.4.0')
+ # Ref.: https://github.com/mpark/variant/issues/60
patch('version.patch', when='@1.4.0')
+ # Ref.: https://github.com/mpark/variant/pull/78
+ patch('icpc.patch', when='@:1.4.0')
cxx11_msg = 'MPark.Variant needs a C++11-capable compiler. ' \
'See https://github.com/mpark/variant#requirements'