1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
Date: Tue, 15 Sep 2020 13:36:04 +1200
From: Michael Hudson-Doyle <michael.hudson@canonical.com>
Bug-Debian: https://bugs.debian.org/969596
Description: Only pass -msse4.1 to the compiler on amd64
--- minimap2.orig/setup.py
+++ minimap2/setup.py
@@ -5,6 +5,7 @@
from distutils.extension import Extension
import sys, platform
+import subprocess
sys.path.append('python')
@@ -13,11 +14,11 @@
extra_objects = ['libminimap2.a']
include_dirs = ["."]
-if platform.machine() in ["aarch64", "arm64"]:
- include_dirs.append("sse2neon/")
- extra_compile_args.extend(['-ftree-vectorize', '-DKSW_SSE2_ONLY', '-D__SSE2__'])
-else:
- extra_compile_args.append('-msse4.1') # WARNING: ancient x86_64 CPUs don't have SSE4
+arch = subprocess.run(["dpkg-architecture", "-qDEB_HOST_ARCH"], capture_output=True, text=True).stdout.strip()
+if arch in ["aarch64", "arm64"]:
+ extra_compile_args.extend(['-ftree-vectorize', '-DKSW_SSE2_ONLY', '-DUSE_SIMDE', '-D__SSE2__', '-DSIMDE_ENABLE_NATIVE_ALIASES', '-fopenmp-simd', '-O3', '-DSIMDE_ENABLE_OPENMP'])
+elif arch != "amd64":
+ extra_compile_args.extend(['-DKSW_SSE2_ONLY', '-DUSE_SIMDE', '-DSIMDE_ENABLE_NATIVE_ALIASES', '-fopenmp-simd', '-O3', '-DSIMDE_ENABLE_OPENMP'])
def readme():
with open('python/README.rst') as f:
|