aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Enge <privat@xobs-novena>2015-10-01 10:32:29 +0200
committerAndreas Enge <andreas@enge.fr>2015-10-01 19:35:16 +0200
commit71923a91b10860b00ce5cd06438b3ab0cadf616d (patch)
tree32386ffa40b2228a0e2f15138fadf08fe3b74159
parentcfd745d6bb85976387d6e9d8633cbd2bc7530e90 (diff)
downloadgnu-guix-71923a91b10860b00ce5cd06438b3ab0cadf616d.tar
gnu-guix-71923a91b10860b00ce5cd06438b3ab0cadf616d.tar.gz
gnu: openblas: Fix configure flags on armhf and take target system into account for cross building.
* gnu/packages/maths.scm (openblas)[arguments]: Make package substitutable and enable runtime cpu detection only on x86 systems. Take the target system into account when cross compiling.
-rw-r--r--gnu/packages/maths.scm18
1 files changed, 12 insertions, 6 deletions
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index 45fda144be..c9389f4172 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1474,10 +1474,13 @@ constant parts of it.")
(build-system gnu-build-system)
(arguments
`(#:tests? #f ;no "check" target
- ;; DYNAMIC_ARCH is not supported on MIPS. When it is disabled,
+ ;; DYNAMIC_ARCH is only supported on x86. When it is disabled,
;; OpenBLAS will tune itself to the build host, so we need to disable
;; substitutions.
- #:substitutable? ,(not (string-prefix? "mips" (%current-system)))
+ #:substitutable?
+ ,(let ((system (or (%current-target-system) (%current-system))))
+ (or (string-prefix? "x86_64" system)
+ (string-prefix? "i686" system)))
#:make-flags
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"SHELL=bash"
@@ -1485,10 +1488,13 @@ constant parts of it.")
;; Build the library for all supported CPUs. This allows
;; switching CPU targets at runtime with the environment variable
;; OPENBLAS_CORETYPE=<type>, where "type" is a supported CPU type.
- ;; Unfortunately, this is not supported on MIPS.
- ,@(if (string-prefix? "mips" (%current-system))
- '()
- '("DYNAMIC_ARCH=1")))
+ ;; Unfortunately, this is not supported on non-x86 architectures,
+ ;; where it leads to failed builds.
+ ,@(let ((system (or (%current-target-system) (%current-system))))
+ (if (or (string-prefix? "x86_64" system)
+ (string-prefix? "i686" system))
+ '("DYNAMIC_ARCH=1")
+ '())))
;; no configure script
#:phases (alist-delete 'configure %standard-phases)))
(inputs