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: cross-libc: Cross build the correct libc for GNU/Hurd systems. Date: Sun, 12 Jun 2016 18:38:05 +0200 Message-ID: <87vb1el5w2.fsf@gnu.org> References: <530b45d9-81f7-2415-c9ef-6c50a76a2e99@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]:58172) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bC8Os-0006MF-Qg for guix-devel@gnu.org; Sun, 12 Jun 2016 12:38:15 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bC8On-00084k-R4 for guix-devel@gnu.org; Sun, 12 Jun 2016 12:38:13 -0400 In-Reply-To: <530b45d9-81f7-2415-c9ef-6c50a76a2e99@gmail.com> (Manolis Ragkousis's message of "Sun, 12 Jun 2016 14:48: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: > The previous version of my patch was not using target to correctly > determine which glibc to inherit. It was using %current-target-system > which caused me many problems. > > With this version I modified it to use cross-libc-for-target so there > will not be any problems in case %current-target-system is not set. =E2=80=9CProblems=E2=80=9D is a bit vague, but I=E2=80=99m glad you=E2=80= =99ve overcome them. :-) > From 92689506f1969ac67631f77024511a5c96f341e8 Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis > Date: Wed, 8 Jun 2016 17:15:00 +0300 > Subject: [PATCH] gnu: cross-libc: Cross build the correct libc for GNU/Hu= rd > systems. > > * gnu/packages/cross-base.scm (cross-libc): Add xgnumach-headers, xmig, > xhurd-headers, xglibc/hurd-headers, xhurd-minimal, xhurd-core-headers, > cross-kernel-headers and cross-libc-for-target. Use "cross-libc-for-ta= rget" > to determine the correct libc to use. > [arguments]: Set "CROSS_LIBRARY_PATH". > [propagated-inputs]: Use "cross-kernel-headers" to determine the correc= t headers. > [native-inputs]: Use "cross-mig" when target is GNU/Hurd. [...] > + (define (cross-kernel-headers target) > + "Return headers depending on TARGET." > + (match target > + ((or "i586-pc-gnu" "i586-gnu") xhurd-core-headers) > + (_ xlinux-headers))) Could you move this procedure, as well as xgnumach-headers and co., to the top level? That way there=E2=80=99d be less =E2=80=9Cclutter=E2=80=9D = in the definition of =E2=80=98cross-libc=E2=80=99 itself. WDYT? Other than that it LGTM, but if, and only if, you can verify that this does not cause any regression for other cross-compilation targets. Normally this should not change derivations at all so you don=E2=80=99t even need to build them. Just run this: ./pre-inst-env guix build gcc --target=3Dmips64el-linux-gnu -d both before and after the change, and the result should be the same .drv file name. Thanks! Ludo=E2=80=99.