aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/bioinformatics.scm
diff options
context:
space:
mode:
authorRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-10-23 14:16:27 +0200
committerRicardo Wurmus <ricardo.wurmus@mdc-berlin.de>2015-10-27 12:06:55 +0100
commit104c1986ac0c786440ece5d3fe88e9d501ba65e3 (patch)
treedf433114c635e05a5612f0335095134940fbed46 /gnu/packages/bioinformatics.scm
parent61d5fd03bf2840849b82c7d9ed5eebc313e043b9 (diff)
downloadguix-104c1986ac0c786440ece5d3fe88e9d501ba65e3.tar
guix-104c1986ac0c786440ece5d3fe88e9d501ba65e3.tar.gz
gnu: subread: Use SSE optimizations on x86_64 only.
* gnu/packages/bioinformatics.scm (subread)[arguments]: Override CC and CCFLAGS conditionally dependent on target system.
Diffstat (limited to 'gnu/packages/bioinformatics.scm')
-rw-r--r--gnu/packages/bioinformatics.scm19
1 files changed, 18 insertions, 1 deletions
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