Hi Guix,

the attached patch should fix the build of subread on non-x86_64 by
overriding the CC and CCFLAGS variables, which by default are set to
contain a lot of x86_64 optimisations.

~~ Ricardo

>From 71a37b56d0962f0db4009bdb6a88c22025278a00 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <[email protected]>
Date: Fri, 23 Oct 2015 14:16:27 +0200
Subject: [PATCH] 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 | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm
index 8a81150..ddaffd8 100644
--- a/gnu/packages/bioinformatics.scm
+++ b/gnu/packages/bioinformatics.scm
@@ -2814,7 +2814,21 @@ sequences.")
     (build-system gnu-build-system)
     (arguments
      `(#:tests? #f ;no "check" target
-       #:make-flags '("-f" "Makefile.Linux")
+       #: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
-- 
2.1.0

Reply via email to