summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorTomoyasu Nojiri <68096132+t-nojiri@users.noreply.github.com>2021-01-29 17:37:00 +0900
committerGitHub <noreply@github.com>2021-01-29 09:37:00 +0100
commitbc639fe60b9c6cb861b72b7a14d20f7e680c072f (patch)
tree4529be795548015a3970fa1c8e73ce9c6bf86d8b /var
parentb18479a2bd3156adeab3bcd641c58a589e5cf976 (diff)
downloadspack-bc639fe60b9c6cb861b72b7a14d20f7e680c072f.tar.gz
spack-bc639fe60b9c6cb861b72b7a14d20f7e680c072f.tar.bz2
spack-bc639fe60b9c6cb861b72b7a14d20f7e680c072f.tar.xz
spack-bc639fe60b9c6cb861b72b7a14d20f7e680c072f.zip
wtdbg2: enable build for aarch64 (#21390)
Use sse2neon to maintain the same API calls for aarch64
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/wtdbg2/for_aarch64.patch23
-rw-r--r--var/spack/repos/builtin/packages/wtdbg2/package.py8
2 files changed, 31 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/wtdbg2/for_aarch64.patch b/var/spack/repos/builtin/packages/wtdbg2/for_aarch64.patch
new file mode 100644
index 0000000000..425edc927f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/wtdbg2/for_aarch64.patch
@@ -0,0 +1,23 @@
+--- spack-src/ksw.c.bak 2019-01-21 10:35:00.000000000 +0900
++++ spack-src/ksw.c 2021-01-29 16:24:06.281952856 +0900
+@@ -25,7 +25,7 @@
+
+ #include <stdlib.h>
+ #include <stdint.h>
+-#include <emmintrin.h>
++#include <sse2neon.h>
+ #include "ksw.h"
+
+ #ifdef USE_MALLOC_WRAPPERS
+--- spack-src/poacns.h.bak 2019-01-21 10:35:00.000000000 +0900
++++ spack-src/poacns.h 2021-01-29 16:23:27.631956791 +0900
+@@ -25,8 +25,7 @@
+ #include "chararray.h"
+ #include "list.h"
+ #include "hashset.h"
+-#include <emmintrin.h>
+-#include <tmmintrin.h>
++#include <sse2neon.h>
+
+ #if __BYTE_ORDER == 1234
+ //#pragma message(" ** " __FILE__ " has been tested in LITTLE_ENDIAN **\n")
diff --git a/var/spack/repos/builtin/packages/wtdbg2/package.py b/var/spack/repos/builtin/packages/wtdbg2/package.py
index ad81c4d52f..299ad7f34c 100644
--- a/var/spack/repos/builtin/packages/wtdbg2/package.py
+++ b/var/spack/repos/builtin/packages/wtdbg2/package.py
@@ -15,6 +15,14 @@ class Wtdbg2(MakefilePackage):
version('2.3', sha256='fb61d38a4c60a39b3b194e63b855141c05ddcbe71cf244ae613766a9b0a56621')
depends_on('zlib')
+ depends_on('sse2neon', when='target=aarch64:')
+
+ patch('for_aarch64.patch', when='target=aarch64:')
+
+ def edit(self, spec, prefix):
+ if spec.target.family == 'aarch64':
+ makefile = FileFilter('Makefile')
+ makefile.filter('-mpopcnt -msse4.2', '')
def install(self, spec, prefix):
make('install', 'BIN=%s' % prefix.bin)