all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: guix-devel <guix-devel@gnu.org>
Subject: [PATCH] Attempt to fix OpenBLAS on MIPS.
Date: Mon, 20 Jul 2015 15:11:37 +0200	[thread overview]
Message-ID: <idjmvyr2cty.fsf@bimsb-sys02.mdc-berlin.net> (raw)

[-- Attachment #1: Type: text/plain, Size: 609 bytes --]

Attached is a patch that *might* fix the build of OpenBLAS on MIPS.

The LOONGSON3A and LOONGSON3B targets both enable the use of special
extended instructions which may not be available on other MIPS CPUs.
This patch forces the SICORTEX target to be used, which should limit the
code to only standard MIPS instructions.

I don’t know if this would actually work and I note that SICORTEX is
listed as a “mips” target, rather than “mips64”, so maybe this is doomed
to fail.  I would appreciate it if someone with a MIPS machine could
test this patch.

Thanks in advance!

~~ Ricardo


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-openblas-Force-SICORTEX-target-for-MIPS.patch --]
[-- Type: text/x-patch, Size: 1286 bytes --]

From fd611c8d8ccc5159487a1a80bb7950a8a759cfc6 Mon Sep 17 00:00:00 2001
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Date: Mon, 20 Jul 2015 15:05:55 +0200
Subject: [PATCH] gnu: openblas: Force SICORTEX target for MIPS.

* gnu/packages/maths.scm (openblas)[arguments]: Add "TARGET=SICORTEX" to make
  flags on MIPS.
---
 gnu/packages/maths.scm | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm
index d365481..f2d303a 100644
--- a/gnu/packages/maths.scm
+++ b/gnu/packages/maths.scm
@@ -1485,8 +1485,12 @@ constant parts of it.")
              ;; 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.
+
+             ;; On MIPS we force the SICORTEX TARGET, as for the other two
+             ;; available MIPS targets special Loongson extended instructions
+             ;; are used.
              ,@(if (string-prefix? "mips" (%current-system))
-                   '()
+                   '("TARGET=SICORTEX")
                    '("DYNAMIC_ARCH=1")))
        ;; no configure script
        #:phases (alist-delete 'configure %standard-phases)))
-- 
2.1.0


             reply	other threads:[~2015-07-20 13:11 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 13:11 Ricardo Wurmus [this message]
2015-07-21 15:15 ` [PATCH] Attempt to fix OpenBLAS on MIPS Mark H Weaver
2015-07-21 16:48   ` Mark H Weaver
2015-07-22 15:59     ` Ricardo Wurmus
2015-07-22 17:19       ` Andreas Enge
2015-07-22 20:02         ` Mark H Weaver
2015-07-22 20:07           ` Mark H Weaver
2015-08-24 12:28             ` Ricardo Wurmus
2015-09-24  8:27               ` Ricardo Wurmus
2015-07-23  1:28           ` Mark H Weaver

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=idjmvyr2cty.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.