diff options
author | Efraim Flashner <efraim@flashner.co.il> | 2020-12-07 12:24:17 +0200 |
---|---|---|
committer | Efraim Flashner <efraim@flashner.co.il> | 2020-12-07 12:48:07 +0200 |
commit | 3832704aff7444e26ba7f6915bdb4f718b1bf2f4 (patch) | |
tree | ecc3d654ad23371c540486c5b1d3d12818dd1d21 | |
parent | f48cd014f3986de119b746d9181a19ed056a3d37 (diff) | |
download | guix-3832704aff7444e26ba7f6915bdb4f718b1bf2f4.tar.gz |
gnu: minimap2: Fix build on aarch64-linux.
* gnu/packages/bioinformatics.scm (minimap2)[arguments]: Adjust configure-flags to be better per-architecture. [source]: Add patch. * gnu/packages/patches/minimap2-aarch64-support.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it.
-rw-r--r-- | gnu/local.mk | 1 | ||||
-rw-r--r-- | gnu/packages/bioinformatics.scm | 19 | ||||
-rw-r--r-- | gnu/packages/patches/minimap2-aarch64-support.patch | 52 |
3 files changed, 65 insertions, 7 deletions
diff --git a/gnu/local.mk b/gnu/local.mk index 4496cf73fa..f59d2543cd 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1348,6 +1348,7 @@ dist_patch_DATA = \ %D%/packages/patches/mingw-w64-6.0.0-gcc.patch \ %D%/packages/patches/mingw-w64-dlltool-temp-prefix.patch \ %D%/packages/patches/mingw-w64-reproducible-gendef.patch \ + %D%/packages/patches/minimap2-aarch64-support.patch \ %D%/packages/patches/minisat-friend-declaration.patch \ %D%/packages/patches/minisat-install.patch \ %D%/packages/patches/mit-krb5-hurd.patch \ diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 312eb966e7..5efcfdea11 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -13056,7 +13056,8 @@ version does count multisplits.") "minimap2-" version ".tar.bz2")) (sha256 (base32 - "0hi7i9pzxhvjj44khzzzj1lrn5gb5837arr4wgln7k1k5n4ci2mn")))) + "0hi7i9pzxhvjj44khzzzj1lrn5gb5837arr4wgln7k1k5n4ci2mn")) + (patches (search-patches "minimap2-aarch64-support.patch")))) (build-system gnu-build-system) (arguments `(#:tests? #f ; there are none @@ -13065,12 +13066,16 @@ version does count multisplits.") (let ((system ,(or (%current-target-system) (%current-system)))) (cond - ((string-prefix? "x86_64" system) - "all") - ((or (string-prefix? "armhf" system) - (string-prefix? "aarch64" system)) - "arm_neon=1") - (else "sse2only=1")))) + ((string-prefix? "x86_64" system) + "all") + ((or (string-prefix? "i586" system) + (string-prefix? "i686" system)) + "sse2only=1") + ((string-prefix? "armhf" system) + "arm_neon=1") + ((string-prefix? "aarch64" system) + "aarch64=1") + (else "")))) #:phases (modify-phases %standard-phases (delete 'configure) diff --git a/gnu/packages/patches/minimap2-aarch64-support.patch b/gnu/packages/patches/minimap2-aarch64-support.patch new file mode 100644 index 0000000000..95db8579d6 --- /dev/null +++ b/gnu/packages/patches/minimap2-aarch64-support.patch @@ -0,0 +1,52 @@ +This patch should be removed with the next release. There is WIP upstream +support for proper support of more architectures, including aarch64 and powerpc64le. + +diff --git a/Makefile b/Makefile +index ed341f6..94dbd85 100644 +--- a/Makefile ++++ b/Makefile +@@ -6,20 +6,18 @@ PROG= minimap2 + PROG_EXTRA= sdust minimap2-lite + LIBS= -lm -lz -lpthread + +-ifeq ($(arm_neon),) # if arm_neon is not defined +-ifeq ($(sse2only),) # if sse2only is not defined +- OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o +-else # if sse2only is defined +- OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o +-endif +-else # if arm_neon is defined ++ifneq ($(arm_neon),) # if arm_neon is defined + OBJS+=ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o +- INCLUDES+=-Isse2neon +-ifeq ($(aarch64),) #if aarch64 is not defined + CFLAGS+=-D_FILE_OFFSET_BITS=64 -mfpu=neon -fsigned-char +-else #if aarch64 is defined ++ INCLUDES+=-Isse2neon ++else ifneq ($(aarch64),) #if aarch64 is defined ++ OBJS+=ksw2_extz2_neon.o ksw2_extd2_neon.o ksw2_exts2_neon.o + CFLAGS+=-D_FILE_OFFSET_BITS=64 -fsigned-char +-endif ++ INCLUDES+=-Isse2neon ++else ifneq ($(sse2only),) # if sse2only is defined ++ OBJS+=ksw2_extz2_sse.o ksw2_extd2_sse.o ksw2_exts2_sse.o ++else # none of the above ++ OBJS+=ksw2_extz2_sse41.o ksw2_extd2_sse41.o ksw2_exts2_sse41.o ksw2_extz2_sse2.o ksw2_extd2_sse2.o ksw2_exts2_sse2.o ksw2_dispatch.o + endif + + .PHONY:all extra clean depend +@@ -46,9 +44,12 @@ sdust:sdust.c kalloc.o kalloc.h kdq.h kvec.h kseq.h ketopt.h sdust.h + + # SSE-specific targets on x86/x86_64 + +-ifeq ($(arm_neon),) # if arm_neon is defined, compile this target with the default setting (i.e. no -msse2) ++ifneq ($(arm_neon),) # if arm_neon is defined, compile this target with the default setting (i.e. no -msse2) ++ksw2_ll_sse.o:ksw2_ll_sse.c ksw2.h kalloc.h ++else ifneq ($(aarch64),) + ksw2_ll_sse.o:ksw2_ll_sse.c ksw2.h kalloc.h +- $(CC) -c $(CFLAGS) -msse2 $(CPPFLAGS) $(INCLUDES) $< -o $@ ++else ++ $(CC) -c $(CFLAGS) -msse2 $(CPPFLAGS) $(INCLUDES) $< -o $@ + endif + + ksw2_extz2_sse41.o:ksw2_extz2_sse.c ksw2.h kalloc.h |