From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Glibc/hurd work till now Date: Sat, 22 Mar 2014 15:16:06 +0100 Message-ID: <877g7mz5cp.fsf@gnu.org> References: <87y5078wfh.fsf@gnu.org> <20140318145504.GA30160@debian> <8761nb8pcu.fsf@gnu.org> <87y507fdpg.fsf@gnu.org> <87vbva54ff.fsf@gnu.org> <87eh1x6ebe.fsf@gnu.org> 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]:54731) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRMie-0008TP-CS for Guix-devel@gnu.org; Sat, 22 Mar 2014 10:16:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WRMiV-0000lU-VA for Guix-devel@gnu.org; Sat, 22 Mar 2014 10:16:16 -0400 Received: from hera.aquilenet.fr ([2a01:474::1]:44482) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WRMiV-0000lO-OC for Guix-devel@gnu.org; Sat, 22 Mar 2014 10:16:07 -0400 In-Reply-To: (Manolis Ragkousis's message of "Fri, 21 Mar 2014 23:23:32 +0000") 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@gnu.org Manolis Ragkousis skribis: > I started writing the macro that chooses between 'glibc/linux' and > 'glibc/hurd' so I added #:export (glibc) at defined modules, renamed glibc > to glibc/linux and then I added > > (define (glibc-for-target target) > "Return the glibc for TARGET, glibc/linux for a linux host or > glibc/hurd for a hurd host" > (match target > ("i686-pc-gnu" glibc/hurd) > (_ glibc/linux))) > > (define-syntax glibc > (identifier-syntax (glibc-for-target (%current-target-system)))) Looks good! It should be: (glibc-for-target (or (%current-target-system) (%current-system))) so that, when we build natively on GNU/Hurd, we also end up using glibc/hurd. > Is my approach right? Because I am getting the error > > gnu/packages/base.scm:772:3: In procedure #: > gnu/packages/base.scm:772:3: In procedure struct-ref: Wrong type argument > in position 1 (expecting struct): # Run =E2=80=98make clean-go && make=E2=80=99 to recompile the Scheme file, a= nd everything will be alright, hopefully. :-) (This is because macros are expanded at compile time, so any Scheme file that refers to =E2=80=98glibc=E2=80=99 must be recompiled so that the macro= gets expanded.) Ludo=E2=80=99.