summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorKelly (KT) Thompson <KineticTheory@users.noreply.github.com>2019-05-08 08:38:47 -0600
committerChristoph Junghans <junghans@lanl.gov>2019-05-08 08:38:47 -0600
commitbcdf9572e5c8387daf03caa288a7d8cc1f2b661d (patch)
tree1e08b0a553e3575a218db3bd63a40e15da779f77 /var
parent6cdbc33c90fc347d951d88ec487ca99c6a261dfd (diff)
downloadspack-bcdf9572e5c8387daf03caa288a7d8cc1f2b661d.tar.gz
spack-bcdf9572e5c8387daf03caa288a7d8cc1f2b661d.tar.bz2
spack-bcdf9572e5c8387daf03caa288a7d8cc1f2b661d.tar.xz
spack-bcdf9572e5c8387daf03caa288a7d8cc1f2b661d.zip
Provide a patched version of random123 that will work on ARM platforms (#11388)
+ The additional patch enables a non-optimized random123 code path that will work on ARM architectures. This solution is provided only for version 1.09 to allow the most current version of Random123 to function on ARM architectures. + A more complete, long term solution will be the addition of a native ARM intrinsics-based implementation of random123. This solution is being worked on but it is several weeks or months away. Once the full implementation is available it will be provided to the author/maintainer of Random123.
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/random123/arm-gcc.patch13
-rw-r--r--var/spack/repos/builtin/packages/random123/package.py1
2 files changed, 14 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/random123/arm-gcc.patch b/var/spack/repos/builtin/packages/random123/arm-gcc.patch
new file mode 100644
index 0000000000..13c51d3c5e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/random123/arm-gcc.patch
@@ -0,0 +1,13 @@
+--- a/include/Random123/features/gccfeatures.h
++++ b/include/Random123/features/gccfeatures.h
+@@ -34,8 +34,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+ #define R123_GNUC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
+
+-#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__)
+-# error "This code has only been tested on x86 and powerpc platforms."
++#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) && !defined(__aarch64__)
++# error "This code has only been tested on x86, arm, and powerpc platforms."
+ #include <including_a_nonexistent_file_will_stop_some_compilers_from_continuing_with_a_hopeless_task>
+ { /* maybe an unbalanced brace will terminate the compilation */
+ /* Feel free to try the Random123 library on other architectures by changing
diff --git a/var/spack/repos/builtin/packages/random123/package.py b/var/spack/repos/builtin/packages/random123/package.py
index a71a119249..0a8b25601a 100644
--- a/var/spack/repos/builtin/packages/random123/package.py
+++ b/var/spack/repos/builtin/packages/random123/package.py
@@ -18,6 +18,7 @@ class Random123(Package):
version('1.09', '67ae45ff94b12acea590a6aa04ed1123')
patch('ibmxl.patch', when='@1.09')
+ patch('arm-gcc.patch', when='@1.09')
def install(self, spec, prefix):
# Random123 doesn't have a build system.