summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authort-nojiri <68096132+t-nojiri@users.noreply.github.com>2020-09-25 16:33:03 +0900
committerGitHub <noreply@github.com>2020-09-25 09:33:03 +0200
commit9cc0bc9ca3ac50b17c7218ecff180716e797007d (patch)
treed1d5e8f3e209304ee331868707c41f4b1b4f24e3
parenta7cbd6074e6d654ff4f0708aa7f18003a364ad6f (diff)
downloadspack-9cc0bc9ca3ac50b17c7218ecff180716e797007d.tar.gz
spack-9cc0bc9ca3ac50b17c7218ecff180716e797007d.tar.bz2
spack-9cc0bc9ca3ac50b17c7218ecff180716e797007d.tar.xz
spack-9cc0bc9ca3ac50b17c7218ecff180716e797007d.zip
steps:allow building on aarch64 (#18966)
-rw-r--r--var/spack/repos/builtin/packages/steps/for_aarch64.patch11
-rw-r--r--var/spack/repos/builtin/packages/steps/package.py2
2 files changed, 13 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/steps/for_aarch64.patch b/var/spack/repos/builtin/packages/steps/for_aarch64.patch
new file mode 100644
index 0000000000..e238cf6b02
--- /dev/null
+++ b/var/spack/repos/builtin/packages/steps/for_aarch64.patch
@@ -0,0 +1,11 @@
+--- spack-src/src/third_party/Random123/features/gccfeatures.h.bak 2020-01-11 00:45:52.000000000 +0900
++++ spack-src/src/third_party/Random123/features/gccfeatures.h 2020-09-25 13:17:53.218231843 +0900
+@@ -34,7 +34,7 @@
+
+ #define R123_GNUC_VERSION (__GNUC__*10000 + __GNUC_MINOR__*100 + __GNUC_PATCHLEVEL__)
+
+-#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__)
++#if !defined(__x86_64__) && !defined(__i386__) && !defined(__powerpc__) && !defined(__aarch64__)
+ # error "This code has only been tested on x86 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 */
diff --git a/var/spack/repos/builtin/packages/steps/package.py b/var/spack/repos/builtin/packages/steps/package.py
index 4489e34539..dd074f188a 100644
--- a/var/spack/repos/builtin/packages/steps/package.py
+++ b/var/spack/repos/builtin/packages/steps/package.py
@@ -28,6 +28,8 @@ class Steps(CMakePackage):
depends_on("python")
depends_on("py-cython")
+ patch('for_aarch64.patch', when='target=aarch64:')
+
def cmake_args(self):
args = []
spec = self.spec