From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kei Kebreau Subject: Re: [PATCH] gnu: Use hurd-triplet? to check if GNU/Hurd. Date: Mon, 02 Jan 2017 15:11:42 -0500 Message-ID: <87vatxkyrl.fsf@openmailbox.org> References: <20170102192222.17305-1-manolis837@gmail.com> <20170102192222.17305-2-manolis837@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:35008) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cO90M-0004PI-G0 for guix-devel@gnu.org; Mon, 02 Jan 2017 15:14:51 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cO90J-000744-9a for guix-devel@gnu.org; Mon, 02 Jan 2017 15:14:50 -0500 Received: from lb1.openmailbox.org ([5.79.108.160]:43104 helo=mail.openmailbox.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cO90J-00073A-0u for guix-devel@gnu.org; Mon, 02 Jan 2017 15:14:47 -0500 In-Reply-To: <20170102192222.17305-2-manolis837@gmail.com> (manolis's message of "Mon, 2 Jan 2017 21:22:22 +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" To: manolis837@gmail.com Cc: guix-devel@gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable manolis837@gmail.com writes: > From: Manolis Ragkousis > > * gnu/packages/make-bootstrap.scm (hurd-triplet?): Move it from here.. > * gnu/packages/hurd.scm: ..to here. New exported procedure. > * gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash) > [arguments]: Replace string-match. > [inputs]: Same. > * gnu/packages/cross-base.scm (cross-libc)[native-inputs]: Same. > --- > gnu/packages/commencement.scm | 4 ++-- > gnu/packages/cross-base.scm | 2 +- > gnu/packages/hurd.scm | 7 ++++++- > gnu/packages/make-bootstrap.scm | 4 ---- > 4 files changed, 9 insertions(+), 8 deletions(-) > > diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm > index fa72e1a38..273e3ca80 100644 > --- a/gnu/packages/commencement.scm > +++ b/gnu/packages/commencement.scm > @@ -497,7 +497,7 @@ the bootstrap environment." > (unsetenv "CPATH") >=20=20 > ;; Tell 'libpthread' where to find 'libihash' on Hurd s= ystems. > - ,@(if (string-match "i586-gnu" (%current-system)) > + ,@(if (hurd-triplet? (%current-system)) > `((substitute* "libpthread/Makefile" > (("LDLIBS-pthread.so =3D.*") > (string-append "LDLIBS-pthread.so =3D " > @@ -522,7 +522,7 @@ the bootstrap environment." > ,@%boot1-inputs >=20=20 > ;; A native MiG is needed to build Glibc on Hurd. > - ,@(if (string-match "i586-gnu" (%current-system)) > + ,@(if (hurd-triplet? (%current-system)) > `(("mig" ,mig-boot0)) > '()) >=20=20 > diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm > index 763bbf50e..a3dfb8f47 100644 > --- a/gnu/packages/cross-base.scm > +++ b/gnu/packages/cross-base.scm > @@ -468,7 +468,7 @@ XBINUTILS and the cross tool chain." >=20=20 > (native-inputs `(("cross-gcc" ,xgcc) > ("cross-binutils" ,xbinutils) > - ,@(if (string-match (or "i586-pc-gnu" "i586-g= nu") target) > + ,@(if (hurd-triplet? target) > `(("cross-mig" > ,@(assoc-ref (package-native-inputs = xheaders) > "cross-mig"))) > diff --git a/gnu/packages/hurd.scm b/gnu/packages/hurd.scm > index 3b79eab3d..557091d05 100644 > --- a/gnu/packages/hurd.scm > +++ b/gnu/packages/hurd.scm > @@ -28,7 +28,12 @@ > #:use-module (gnu packages bison) > #:use-module (gnu packages perl) > #:use-module (gnu packages base) > - #:use-module (guix git-download)) > + #:use-module (guix git-download) > + #:export (hurd-triplet?)) > + > +(define (hurd-triplet? triplet) > + (and (string-suffix? "-gnu" triplet) > + (not (string-contains triplet "linux")))) >=20=20 > (define-public gnumach-headers > (package > diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstra= p.scm > index 44a7fd3a1..e5c614cee 100644 > --- a/gnu/packages/make-bootstrap.scm > +++ b/gnu/packages/make-bootstrap.scm > @@ -337,10 +337,6 @@ for `sh' in $PATH, and without nscd, and with static= NSS modules." > ;; GNU libc's essential shared libraries, dynamic linker, and headers, > ;; with all references to store directories stripped. As a result, > ;; libc.so is unusable and need to be patched for proper relocation. > - (define (hurd-triplet? triplet) > - (and (string-suffix? "-gnu" triplet) > - (not (string-contains triplet "linux")))) > - > (let ((glibc (glibc-for-bootstrap))) > (package (inherit glibc) > (name "glibc-stripped") LGTM. I assume this one will be pushed to master as well? P.S. Is there currently a way to successfully build the bootstrap binaries for Hurd from Guix on x86_64 Linux? --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEg7ZwOtzKO2lLzi2m5qXuPBlGeg0FAlhqs/4ACgkQ5qXuPBlG eg1Spg//dHiEMRBxggE1yJ000ARmx5w2YVE4sfEOJRFPOCZUKKYIeBYdrGOXUbo1 FK7s/5ZVelyEWDZXDw/HzmckSwLwEKlvIpnDEidkKHNTX8b78u8CJav4ToGiVtV+ zCkhwVpYaXIyF0Iwg2ugHkAhKgeDFoYmHV9wkPX4W5w7cUgQPi/qDdll/uvLIuoV C/Jl6mwnyl0mxuA3H4625P4y3wUV2HRmJAHup8QAIbD3Y9t++CQKkLz3sEPUxeOs azig4Zv4UQlIkhjQsz8IimEVpFqrWfDqni/LxKokSSe4UWC0WtGfmgI/l5lhXPAr pglUcqynkZXMsMaj2ubvPhXRFDzDeJ51Crbc9wnVWQsGTDMQ4EV8eCHocTY9+1yf smFIm55y2XhMLmatSPoDwu/s0IU7/aj+JM4N9mKUiV6IAV1PYFYKHgW5s1k0pr18 hy4J9gCh7wWAfwnKHZNVbpotRXHn4KJdBjdmT1qtbMXawZWHUfXJr3xCJ2/bD6+K fs65DfRqrX4ZJJUO0KG9eNNevR7uUmcDo7yFJhksyfErBChceJ2nXczdFwuzoBr3 wqW341PQUdmUIMlgXN9mjYZMt8j08CeAFUJE1wd/zK0HIo8s3Fdp0CpT2H+S8Dlt QNXHXNJZkyTwLVAsZDqlFuV6GKt/818IW4h3izYPmiQghamfOu0= =oX4E -----END PGP SIGNATURE----- --=-=-=--