summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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.