From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH] gnu: commencement: Add support for a native GNU/Hurd system. Date: Sun, 26 Jun 2016 23:49:43 +0200 Message-ID: <8760svk4co.fsf@gnu.org> References: <73d9a0c2-15df-2064-f17a-4f23780e8e06@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:43414) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bHHw8-0007Du-EA for guix-devel@gnu.org; Sun, 26 Jun 2016 17:49:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bHHw3-0007e9-Gh for guix-devel@gnu.org; Sun, 26 Jun 2016 17:49:52 -0400 In-Reply-To: <73d9a0c2-15df-2064-f17a-4f23780e8e06@gmail.com> (Manolis Ragkousis's message of "Fri, 24 Jun 2016 16:55:29 +0300") 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" To: Manolis Ragkousis Cc: guix-devel@gnu.org Hi! Manolis Ragkousis skribis: > From 151868431cf3faafbf388dd2815745b3760ac12f Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis > Date: Fri, 24 Jun 2016 16:10:15 +0300 > Subject: [PATCH] gnu: commencement: Add support for a native GNU/Hurd sys= tem. > > * gnu/packages/commencement.scm (kernel-headers-boot0, > ld-wrapper-boot0, bison-boot0, flex-boot0, gnumach-headers-boot0, > mig-boot0, hurd-headers-boot0, hurd-minimal-boot0, > hurd-kernel-headers-boot0): New variables. > (bison-boot1): Remove. > (%boot1-inputs): Add ld-wrapper-boot0. > (glibc-final-with-bootstrap-bash)[arguments]: Allow libpthread > to find libihash. > [propagated-inputs]: Use kernel-headers-boot0. > [inputs]: Add "mig". > (glibc-final)[arguments]: Use kernel-headers-boot0. > (static-bash-for-glibc, bash-final)[native-inputs]: Use bison-boot0. OK for =E2=80=98core-updates-next=E2=80=99. Please also run something like this on GNU/Linux: ./pre-inst-env guix build -e '(@@ (gnu packages commencement) glibc-final= )' to make sure nothing obvious broke (this runs in a couple of hours on my laptop IIRC.) [...] > +(define* (kernel-headers-boot0 #:optional (system (%current-system))) > + (match system > + ("i586-gnu" (hurd-core-headers-boot0)) > + (_ (linux-libre-headers-boot0)))) In an subsequent patch, it might make sense to define =E2=80=98kernel-heade= rs=E2=80=99 as a macro like you did for glibc; WDYT? > + ;; Tell 'libpthread' where to find 'libihash' on Hurd s= ystems. > + ,@(if (string-match "i586-gnu" (%current-system)) [...] > + ;; A native MiG is needed to build Glibc on Hurd. > + ,@(if (string-match "i586-gnu" (%current-system)) In a subsequent patch, could you add: (define* (hurd? #:optional (system (%current-system))) (string=3D? "i585-gnu" (%current-system))) and use it? That will make it easier on the day where GNU/Hurd supports other arches. These conditionals aren=E2=80=99t great in terms of readability/maintainabi= lity. We should start thinking of a better approach, a mechanism similar in spirit to =E2=80=9Csysdeps=E2=80=9D in glibc, which would allow us to weave platform-specific concerns without having to wire conditionals everywhere. I don=E2=80=99t have a clear plan in mind, but there=E2=80=99s= definitely something to do here! Thanks! Ludo=E2=80=99.