From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: Guix-devel <guix-devel@gnu.org>
Subject: [PATCH] gnu: openblas: Disable DYNAMIC_ARCH on MIPS.
Date: Tue, 19 May 2015 16:14:39 +0200 [thread overview]
Message-ID: <idjoalgirhs.fsf@bimsb-sys02.mdc-berlin.net> (raw)
[-- Attachment #1: Type: text/plain, Size: 428 bytes --]
Hi Guix,
it was suggested here[1] that DYNAMIC_ARCH does not work on MIPS, so the
package has be built specifically for the CPU of the build host.
Obviously, we lose substitutability in this case.
The attached patch is an attempt to disable DYNAMIC_ARCH when building
on MIPS. (I'm not sure when %current-system is available, so I'm not
sure if the unquoting is correct.)
[1]: https://github.com/xianyi/OpenBLAS/issues/570
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-openblas-Disable-DYNAMIC_ARCH-on-MIPS.patch --]
[-- Type: text/x-patch, Size: 1847 bytes --]
From 0b1779915e4f75511281c01f2f346aa808b90c6d Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Tue, 19 May 2015 16:10:25 +0200
Subject: [PATCH] gnu: openblas: Disable DYNAMIC_ARCH on MIPS.
* gnu/packages/maths.scm (openblas)[arguments]: Do not pass DYNAMIC_ARCH when
building for MIPS. Also make non-substitutable for MIPS.
---
gnu/packages/maths.scm | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index f27903c..8d21a82 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1037,7 +1037,11 @@ constant parts of it.")
"0av3pd96j8rx5i65f652xv9wqfkaqn0w4ma1gvbyz73i6j2hi9db"))))
(build-system gnu-build-system)
(arguments
- '(#:tests? #f ;no "check" target
+ `(#:tests? #f ;no "check" target
+ ;; DYNAMIC_ARCH is not supported on MIPS. 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)))
#:make-flags
(list (string-append "PREFIX=" (assoc-ref %outputs "out"))
"SHELL=bash"
@@ -1045,7 +1049,10 @@ 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.
- "DYNAMIC_ARCH=1")
+ ;; Unfortunately, this is not supported on MIPS.
+ ,@(if (string-prefix? "mips" (%current-system))
+ (list)
+ (list "DYNAMIC_ARCH=1")))
;; no configure script
#:phases (alist-delete 'configure %standard-phases)))
(inputs
--
2.1.0
next reply other threads:[~2015-05-19 14:14 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-19 14:14 Ricardo Wurmus [this message]
2015-05-19 22:35 ` [PATCH] gnu: openblas: Disable DYNAMIC_ARCH on MIPS Mark H Weaver
2015-05-20 11:55 ` Ricardo Wurmus
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=idjoalgirhs.fsf@bimsb-sys02.mdc-berlin.net \
--to=ricardo.wurmus@mdc-berlin.de \
--cc=guix-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.