From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: [PATCH] Attempt to fix OpenBLAS on MIPS. Date: Mon, 20 Jul 2015 15:11:37 +0200 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:58763) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHArH-0002v6-Qn for guix-devel@gnu.org; Mon, 20 Jul 2015 09:11:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZHArC-0004Uj-G4 for guix-devel@gnu.org; Mon, 20 Jul 2015 09:11:51 -0400 Received: from sinope.bbbm.mdc-berlin.de ([141.80.25.23]:43929) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZHArC-0004T6-7C for guix-devel@gnu.org; Mon, 20 Jul 2015 09:11:46 -0400 Received: from localhost (localhost [127.0.0.1]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP id 96B3A280448 for ; Mon, 20 Jul 2015 15:11:44 +0200 (CEST) Received: from sinope.bbbm.mdc-berlin.de ([127.0.0.1]) by localhost (sinope.bbbm.mdc-berlin.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id jJwPkU9_KGFR for ; Mon, 20 Jul 2015 15:11:38 +0200 (CEST) Received: from HTCAONE.mdc-berlin.net (mab.citx.mdc-berlin.de [141.80.36.102]) by sinope.bbbm.mdc-berlin.de (Postfix) with ESMTP for ; Mon, 20 Jul 2015 15:11:38 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel --=-=-= Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable 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=E2=80=99t know if this would actually work and I note that SICORTEX= is listed as a =E2=80=9Cmips=E2=80=9D target, rather than =E2=80=9Cmips64=E2= =80=9D, 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 --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename="0001-gnu-openblas-Force-SICORTEX-target-for-MIPS.patch" >From fd611c8d8ccc5159487a1a80bb7950a8a759cfc6 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus 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=, 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 --=-=-=--