From 104c1986ac0c786440ece5d3fe88e9d501ba65e3 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Fri, 23 Oct 2015 14:16:27 +0200 Subject: gnu: subread: Use SSE optimizations on x86_64 only. * gnu/packages/bioinformatics.scm (subread)[arguments]: Override CC and CCFLAGS conditionally dependent on target system. --- gnu/packages/bioinformatics.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'gnu') diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index 4b7e70f072..9765f1a178 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -2704,7 +2704,24 @@ sequences.") (build-system gnu-build-system) (arguments `(#:tests? #f ;no "check" target - #:make-flags '("-f" "Makefile.Linux") + ;; The CC and CCFLAGS variables are set to contain a lot of x86_64 + ;; optimizations by default, so we override these flags such that x86_64 + ;; flags are only added when the build target is an x86_64 system. + #:make-flags + (list (let ((system ,(or (%current-target-system) + (%current-system))) + (flags '("-ggdb" "-fomit-frame-pointer" + "-ffast-math" "-funroll-loops" + "-fmessage-length=0" + "-O9" "-Wall" "-DMAKE_FOR_EXON" + "-DMAKE_STANDALONE" + "-DSUBREAD_VERSION=\\\"${SUBREAD_VERSION}\\\"")) + (flags64 '("-mmmx" "-msse" "-msse2" "-msse3"))) + (if (string-prefix? "x86_64" system) + (string-append "CCFLAGS=" (string-join (append flags flags64))) + (string-append "CCFLAGS=" (string-join flags)))) + "-f" "Makefile.Linux" + "CC=gcc ${CCFLAGS}") #:phases (alist-cons-after 'unpack 'enter-dir -- cgit v1.2.3