summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorKelly (KT) Thompson <KineticTheory@users.noreply.github.com>2019-03-28 16:20:28 -0600
committerChristoph Junghans <christoph.junghans@gmail.com>2019-03-28 17:20:28 -0500
commitb2b91a1f00bb31bb1f794a3debe83a7352b4f48e (patch)
tree09a56801848e1bd7e979711a18853d64c7836df9 /var
parent06e82edf15ed65678c0f9619f1984a58b20caaea (diff)
downloadspack-b2b91a1f00bb31bb1f794a3debe83a7352b4f48e.tar.gz
spack-b2b91a1f00bb31bb1f794a3debe83a7352b4f48e.tar.bz2
spack-b2b91a1f00bb31bb1f794a3debe83a7352b4f48e.tar.xz
spack-b2b91a1f00bb31bb1f794a3debe83a7352b4f48e.zip
Random123 - provide a patch to fix compiles with IBM XL (#11028)
* Newer versions of IBM XL no longer define `__xlC__`, but define `__ibmxl__` instead. This one-line patch fixes this problem in Random123. * This patch was also provided to the Random123 maintiners (Random123@DEShawResearch.com). I don't expect a new release from them for a while, so I believe that this patch is the correct path forward (for now).
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/random123/ibmxl.patch11
-rw-r--r--var/spack/repos/builtin/packages/random123/package.py2
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/random123/ibmxl.patch b/var/spack/repos/builtin/packages/random123/ibmxl.patch
new file mode 100644
index 0000000000..b074e06e27
--- /dev/null
+++ b/var/spack/repos/builtin/packages/random123/ibmxl.patch
@@ -0,0 +1,11 @@
+--- a/include/Random123/features/compilerfeatures.h
++++ b/include/Random123/features/compilerfeatures.h
+@@ -199,7 +199,7 @@ added to each of the *features.h files, AND to examples/ut_features.cpp.
+ #include "nvccfeatures.h"
+ #elif defined(__ICC)
+ #include "iccfeatures.h"
+-#elif defined(__xlC__)
++#elif defined(__xlC__) || defined(__ibmxl__)
+ #include "xlcfeatures.h"
+ #elif defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+ #include "sunprofeatures.h"
diff --git a/var/spack/repos/builtin/packages/random123/package.py b/var/spack/repos/builtin/packages/random123/package.py
index cf774edf2c..a71a119249 100644
--- a/var/spack/repos/builtin/packages/random123/package.py
+++ b/var/spack/repos/builtin/packages/random123/package.py
@@ -17,6 +17,8 @@ class Random123(Package):
version('1.09', '67ae45ff94b12acea590a6aa04ed1123')
+ patch('ibmxl.patch', when='@1.09')
+
def install(self, spec, prefix):
# Random123 doesn't have a build system.
# We have to do our own install here.