From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Porting to mips64el Date: Thu, 14 Feb 2013 12:33:47 +0100 Message-ID: <87pq03b04k.fsf@gnu.org> References: <8738yvnslh.fsf@karetnikov.org> <87vca2csfk.fsf@gnu.org> <874nhik225.fsf@gnu.org> <201302112234.27887.andreas@enge.fr> <87sj52ijs1.fsf@gnu.org> <871ucmdzq5.fsf@karetnikov.org> <87wqueckw2.fsf@karetnikov.org> <87wqueasef.fsf@karetnikov.org> <871ucjs58v.fsf@karetnikov.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([208.118.235.92]:50281) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5x4l-0005yr-VH for bug-guix@gnu.org; Thu, 14 Feb 2013 06:34:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U5x4f-00025o-5e for bug-guix@gnu.org; Thu, 14 Feb 2013 06:34:03 -0500 Received: from [2a01:e0b:1:123:ca0a:a9ff:fe03:271e] (port=58174 helo=xanadu.aquilenet.fr) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U5x4e-00023m-Qe for bug-guix@gnu.org; Thu, 14 Feb 2013 06:33:57 -0500 In-Reply-To: <871ucjs58v.fsf@karetnikov.org> (Nikita Karetnikov's message of "Thu, 14 Feb 2013 02:51:01 -0500") List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org Sender: bug-guix-bounces+gcggb-bug-guix=m.gmane.org@gnu.org To: Nikita Karetnikov Cc: bug-guix@gnu.org Nikita Karetnikov skribis: > I'm attaching three patches. > '0001-gnu-Disable-Libtool-s-testsuite.patch' and > '0001-gnu-Set-ARCH-to-mips.patch' are for 'mips64el'. The other one is > for 'core-updates', but it's also needed for 'mips64el'. (Should I push > to both?) > > Could you test them? (Don't forget to adjust 'build-aux/download.scm'.) I can=E2=80=99t test on MIPS, but here are some comments. > I'll push them if they are fine. To the =E2=80=98mips64el=E2=80=99 branch. > From 41aeaf76e8c61d184f06e8c886e595e8a97ebd16 Mon Sep 17 00:00:00 2001 > From: Nikita Karetnikov > Date: Thu, 14 Feb 2013 06:25:38 +0000 > Subject: [PATCH] gnu: Remove a newline. Change to =E2=80=9Cgnu: gcc: Remove extraneous newline in LIB_SPEC=E2=80=9D= . Otherwise it sounds like it removes a non-significant newline in the code. > * gnu/packages/base.scm (gcc-4.7): Remove the newline. =E2=80=9CRemove trailing newline when patching =E2=80=98LIB_SPEC=E2=80=99.= =E2=80=9D You can already commit this one with these changes. > From ad1536e4730b9d37a0519fdd29bdd8195554358d Mon Sep 17 00:00:00 2001 > From: Nikita Karetnikov > Date: Thu, 14 Feb 2013 06:36:23 +0000 > Subject: [PATCH] gnu: Disable Libtool's testsuite. > > * gnu/packages/autotools.scm (libtool): Add '#:tests? #f'. > --- > gnu/packages/autotools.scm | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/gnu/packages/autotools.scm b/gnu/packages/autotools.scm > index bc4dddc..e004dd9 100644 > --- a/gnu/packages/autotools.scm > +++ b/gnu/packages/autotools.scm > @@ -195,7 +195,8 @@ Standards. Automake requires the use of Autoconf.") > "out")) ; libltdl.so, ltdl.h, etc. >=20=20 > (arguments > - `(#:patches (list (assoc-ref %build-inputs "patch/skip-tests")) > + `(#:tests? #f Instead of disabling tests for everyone, do something like: `(;; XXX: Work around test failure on MIPS as reported at ;; . #:tests? ,(not (string=3D? (%current-system) "mips64el-linux")) ;; ... ) Once done, you can commit it as well. > From 31a7f172941c592f04f8f741b89e04a2a6677a76 Mon Sep 17 00:00:00 2001 > From: Nikita Karetnikov > Date: Thu, 14 Feb 2013 06:14:48 +0000 > Subject: [PATCH] gnu: Set 'ARCH' to 'mips'. > > * gnu/packages/linux.scm (linux-libre-headers): Set 'ARCH' to 'mips'. > --- > gnu/packages/linux.scm | 19 +++++++++++++++---- > 1 file changed, 15 insertions(+), 4 deletions(-) > > diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm > index 58cddc0..fe8148c 100644 > --- a/gnu/packages/linux.scm > +++ b/gnu/packages/linux.scm > @@ -29,20 +29,31 @@ > #:use-module (gnu packages pkg-config) > #:use-module (guix packages) > #:use-module (guix download) > - #:use-module (guix build-system gnu)) > + #:use-module (guix build-system gnu) > + #:use-module ((guix utils) #:select (%current-system))) >=20=20 > (define-public linux-libre-headers > (let* ((version* "3.3.8") > (build-phase > - '(lambda* (#:key system #:allow-other-keys) > + (lambda () > + `(lambda* (#:key system #:allow-other-keys) > (let ((arch (car (string-split system #\-)))) > (setenv "ARCH" > (cond ((string=3D? arch "i686") "i386") > + > + ;; FIXME: The unquote below is just to > + ;; avoid triggering a rebuild. Remove me > + ;; on the next core-updates. > + ,@(if (string-prefix? "mips" > + (%current-system)) > + `(((string-prefix? "mips" arch) > + "mips")) > + '()) Now that we=E2=80=99re triggering a rebuild anyway, let=E2=80=99s write it = the normal way, that is: (setenv "ARCH" (cond ((string=3D? arch "i686") "i386") ((string-prefix? "mips" arch") "mips") (else arch))) Actually, even better would be do that in host code, as done with =E2=80=98glibc-dynamic-linker=E2=80=99: (define (system->linux-architecture arch) (let ((arch (car (string-split arch #\-)))) (cond ((string=3D? arch "i686") "i386") ((string-prefix? "mips" arch") "mips") (else arch)))) And then, change =E2=80=98build-phase=E2=80=99 to something like: (let ((build-phase (lambda (arch) `(lambda _ (setenv "ARCH" ,(system->linux-architecture arch)) ...)))) (arguments `(#:phase ... ,(build-phase (%current-system)) ...))) Could you try that? Thanks! Ludo=E2=80=99.