From mboxrd@z Thu Jan 1 00:00:00 1970 From: Nikita Karetnikov Subject: Re: Porting to mips64el Date: Tue, 19 Feb 2013 04:49:41 -0500 Message-ID: <878v6kzl5z.fsf@karetnikov.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> <87pq03b04k.fsf@gnu.org> <87liapfib6.fsf@karetnikov.org> <87d2w0hsr6.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([208.118.235.92]:56036) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1U7jpV-0006Ar-Re for bug-guix@gnu.org; Tue, 19 Feb 2013 04:49:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1U7jpS-0003iz-Uo for bug-guix@gnu.org; Tue, 19 Feb 2013 04:49:41 -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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: bug-guix@gnu.org --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable >> What do you mean by "host code"? > I mean code that runs in your =E2=80=98guix-build=E2=80=99 process, as op= posed to > builder code running in the chroot (search the manual for =E2=80=9Cstrata= =E2=80=9D.) I've read the manual. But it's still not clear. For example: How can I tell which expression is run by a Guile process launched by the daemon? Build succeeded; I'm attaching the patch. (Andreas, could you test it?) Is it OK to push? --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=0001-gnu-Set-ARCH-to-mips.patch Content-Transfer-Encoding: quoted-printable From=2092f945333f8fa31c855e75ea59d274d457656cfe Mon Sep 17 00:00:00 2001 From: Nikita Karetnikov Date: Tue, 19 Feb 2013 09:37:11 +0000 Subject: [PATCH] gnu: Set 'ARCH' to 'mips'. * gnu/packages/linux.scm (system->linux-architecture): New procedure. (linux-libre-headers): Adjust accordingly. =2D-- gnu/packages/linux.scm | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 58cddc0..e88c6ae 100644 =2D-- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -31,18 +31,22 @@ #:use-module (guix download) #:use-module (guix build-system gnu)) =20 +(define (system->linux-architecture arch) + (let ((arch (car (string-split arch #\-)))) + (cond ((string=3D? arch "i686") "i386") + ((string-prefix? "mips" arch) "mips") + (else arch)))) + (define-public linux-libre-headers (let* ((version* "3.3.8") (build-phase =2D '(lambda* (#:key system #:allow-other-keys) =2D (let ((arch (car (string-split system #\-)))) =2D (setenv "ARCH" =2D (cond ((string=3D? arch "i686") "i386") =2D (else arch))) =2D (format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))) + (lambda (arch) + `(lambda _ + (setenv "ARCH" ,(system->linux-architecture arch)) + (format #t "`ARCH' set to `~a'~%" (getenv "ARCH")) =20 =2D (and (zero? (system* "make" "defconfig")) =2D (zero? (system* "make" "mrproper" "headers_check"))))) + (and (zero? (system* "make" "defconfig")) + (zero? (system* "make" "mrproper" "headers_check")))))) (install-phase `(lambda* (#:key outputs #:allow-other-keys) (let ((out (assoc-ref outputs "out"))) @@ -73,7 +77,7 @@ (guix build utils) (srfi srfi-1)) #:phases (alist-replace =2D 'build ,build-phase + 'build ,(build-phase (%current-system)) (alist-replace 'install ,install-phase (alist-delete 'configure %standard-phases))) =2D-=20 1.8.0.2 --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iQIcBAEBAgAGBQJRI0scAAoJEM+IQzI9IQ38SWMP/RUVVMzYeZ+GyYcvv3h5pD0a XW5zf+Gi8EhT2lJRKS/SczT/TlBVHFB3gWYcL0ML8BgNMK3e7sMG06C9nyDt50R4 fdiWPHuAIxIu2JI+5CLv4TDwwGhFKor6yTikzsBlLvs9nfgVXt7+5p9zipJhpYJ7 BlSIC4LBq/55OMKKLTdHzvoCPFxSmfd62DEJQQgRKN+l1tn7VOvbudU9y6G6QpR7 QutVbKUf/7N+hnOKOIXsL+sg43xT+ybjgHyLzIbli92Ijp4L+imCpG4ReoYxpmGT I+9cT6gnL3U87tzE7hRpASvO0CognTsKOBprcOZAvzZxh8IRGpQK/DJCM9utgPrY ojh2d/HtGO1r5KS6SEIkh7HHTvQdY1HPkastXd8F7m45McMJyUOt9O8vGGJV8Q5z HLdYVtL7nAYMdZ38IQQMkQK3wPRwM4G8dFUryli/jzlJH60A4UsZ7AuCAkK+HmS3 Cj5ajzpbbajICloe50AZ1g55UYuOSrO7aB9vxZucsqQ3/vEUpD0WOEhpsp/XNwVE PA8wg7iBALTPijJTgRTSG/in8uKS/pSW8tUwSS5uepNV306+iM23FXkU0gLJC50y feoBLLFGKya9b57Go484kIhFG1A2m0doFg3suSA5zVKrM3GGB3K6SgMxPtQesUKD Epy0hdTEl+MQxQPtxBvR =motV -----END PGP SIGNATURE----- --==-=-=--