Skip to content

Commit

Permalink
sci-biology/mmseqs2: properly respect the cpu flags
Browse files Browse the repository at this point in the history
Upstream PR is here: soedinglab/MMseqs2#533
See also: #1143

Package-Manager: Portage-3.0.30, Repoman-3.0.3
Signed-off-by: Andrew Ammerlaan <[email protected]>
  • Loading branch information
Nowa-Ammerlaan committed Feb 13, 2022
1 parent 7f5db31 commit dd69c77
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1a677e3..df1d765 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -56,23 +56,29 @@ if (HAVE_AVX2)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -mavx2 -mcx16 -Wa,-q")
endif ()
set(X64 1)
-elseif (HAVE_SSE4_1)
+endif ()
+if (HAVE_SSE4_1)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -msse4.1 -mcx16")
set(X64 1)
-elseif (HAVE_SSE2)
+endif ()
+if (HAVE_SSE2)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -msse2")
set(DISABLE_IPS4O 1)
set(X64 1)
-elseif (HAVE_POWER9)
+endif ()
+if (HAVE_POWER9)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -mcpu=power9 -mvsx")
set(PPC64 1)
-elseif (HAVE_POWER8)
+endif ()
+if (HAVE_POWER8)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -mcpu=power8 -mvsx")
set(PPC64 1)
-elseif (HAVE_ARM8)
+endif ()
+if (HAVE_ARM8)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -march=armv8-a+simd")
set(ARM 1)
-elseif (HAVE_S390X)
+endif ()
+if (HAVE_S390X)
set(MMSEQS_ARCH "${MMSEQS_ARCH} -mzarch -march=z14")
set(ZARCH 1)
endif ()
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ RDEPEND="
"
DEPEND="${RDEPEND}"

PATCHES=(
"${FILESDIR}/${P}-properly-handle-cpuflags.patch"
)

src_configure() {
local mycmakeargs=(
# Need static libs: https://github.com/soedinglab/MMseqs2/issues/411
Expand Down

0 comments on commit dd69c77

Please sign in to comment.