From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] gnu: openblas: Disable DYNAMIC_ARCH on MIPS. Date: Tue, 19 May 2015 18:35:16 -0400 Message-ID: <87a8x0mc0r.fsf@netris.org> References: Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48582) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuq6j-0006Oi-25 for guix-devel@gnu.org; Tue, 19 May 2015 18:35:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yuq6f-0004Oz-Oi for guix-devel@gnu.org; Tue, 19 May 2015 18:35:29 -0400 Received: from world.peace.net ([50.252.239.5]:42326) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yuq6f-0004Ou-7h for guix-devel@gnu.org; Tue, 19 May 2015 18:35:25 -0400 In-Reply-To: (Ricardo Wurmus's message of "Tue, 19 May 2015 16:14:39 +0200") 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: Ricardo Wurmus Cc: Guix-devel Ricardo Wurmus writes: > 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 > > From 0b1779915e4f75511281c01f2f346aa808b90c6d Mon Sep 17 00:00:00 2001 > From: Ricardo Wurmus > 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=, 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"))) It would be marginally preferable to use '() and '("DYNAMIC_ARCH=1") here. Anyway, okay to push! Thanks, Mark