From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 10/10] gnu: base: Added glibc-for-target macro. Date: Wed, 20 May 2015 14:47:20 +0200 Message-ID: <87zj4z8lgn.fsf@gnu.org> References: 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]:55689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv3PF-0003Nz-Ib for Guix-devel@gnu.org; Wed, 20 May 2015 08:47:30 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yv3PC-0001KP-8U for Guix-devel@gnu.org; Wed, 20 May 2015 08:47:29 -0400 Received: from fencepost.gnu.org ([2001:4830:134:3::e]:42218) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yv3PC-0001KL-5j for Guix-devel@gnu.org; Wed, 20 May 2015 08:47:26 -0400 In-Reply-To: (Manolis Ragkousis's message of "Tue, 19 May 2015 01:53:39 +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-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Manolis Ragkousis Cc: Guix-devel Manolis Ragkousis skribis: > The macro that doesn't work as expected. How doesn=E2=80=99t it work exactly? :-) Note that because this patch changes =E2=80=98glibc=E2=80=99 from a =E2=80= =9Cnormal=E2=80=9D variable to a syntax object, you need to =E2=80=98make clean-go && make=E2=80=99. > From 8534372800703610b1436870da2caf1fa3c9796c Mon Sep 17 00:00:00 2001 > From: Manolis Ragkousis > Date: Tue, 19 May 2015 01:42:14 +0300 > Subject: [PATCH 10/10] gnu: base: Added glibc-for-target macro. > > gnu/packages/base.scm (glibc): Add macro. Missing star. > +(define-public glibc/hurd > + (package (inherit glibc/linux) > + (name "glibc-hurd") I see you moved this definition and =E2=80=98glibc/hurd-headers=E2=80=99 up= ward, but this is not necessary AFAICS. Could you avoid this change in the next iteration of the patch? > +(define (glibc-for-target target) Please make it: (define* (glibc-for-target #:optional (target (or (%current-target-system) (%current-system)))) ;; ... ) > + "Return the glibc for TARGET, glibc/linux for a linux host or > +glibc/hurd for a hurd host" Use capital letters when referring to variables, so GLIBC/LINUX and GLIBC/Hurd. Spelling: Linux, Hurd. > +(define-syntax glibc > + (identifier-syntax (glibc-for-target (or (%current-target-system) (%cu= rrent-system))))) Now this can become: (define-syntax glibc (identifier-syntax (glibc-for-target))) which reduces code duplication. That looks good to me, but now I want to know what doesn=E2=80=99t work. := -) Ludo=E2=80=99.