From: ludo@gnu.org (Ludovic Courtès)
To: Manolis Ragkousis <manolis837@gmail.com>
Cc: Guix-devel@gnu.org
Subject: Re: Glibc/hurd work till now
Date: Sat, 22 Mar 2014 15:16:06 +0100 [thread overview]
Message-ID: <877g7mz5cp.fsf@gnu.org> (raw)
In-Reply-To: <CAFtzXzOfwLtvuct5ww5jYFMXHd6xJzmUMDV24fwSXR0u9Lu2OA@mail.gmail.com> (Manolis Ragkousis's message of "Fri, 21 Mar 2014 23:23:32 +0000")
Manolis Ragkousis <manolis837@gmail.com> 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 #<procedure 48307c0 ()>:
> gnu/packages/base.scm:772:3: In procedure struct-ref: Wrong type argument
> in position 1 (expecting struct): #<syntax-transformer glibc>
Run ‘make clean-go && make’ to recompile the Scheme file, and everything
will be alright, hopefully. :-)
(This is because macros are expanded at compile time, so any Scheme file
that refers to ‘glibc’ must be recompiled so that the macro gets
expanded.)
Ludo’.
next prev parent reply other threads:[~2014-03-22 14:16 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-18 10:02 Glibc/hurd work till now Manolis Ragkousis
2014-03-18 10:57 ` Ludovic Courtès
[not found] ` <CAFtzXzNSuz-wx2SDUafTvqtmRUbfOohO2-Nfzy7LYKd-wuWFWQ@mail.gmail.com>
2014-03-18 11:10 ` Fwd: " Manolis Ragkousis
2014-03-18 13:32 ` Ludovic Courtès
2014-03-18 14:55 ` Andreas Enge
2014-03-18 16:04 ` Ludovic Courtès
2014-03-18 19:06 ` Manolis Ragkousis
2014-03-18 20:34 ` Ludovic Courtès
2014-03-18 20:41 ` Manolis Ragkousis
2014-03-19 19:38 ` Manolis Ragkousis
2014-03-19 20:17 ` Ludovic Courtès
2014-03-19 20:47 ` Manolis Ragkousis
2014-03-19 21:58 ` Ludovic Courtès
2014-03-20 16:02 ` Manolis Ragkousis
2014-03-20 20:42 ` libpthread fails to build as an add-on Ludovic Courtès
2014-03-20 20:58 ` Manolis Ragkousis
2014-03-23 8:28 ` Manolis Ragkousis
2014-03-23 9:17 ` Manolis Ragkousis
2014-03-23 21:38 ` Ludovic Courtès
2014-03-21 23:23 ` Glibc/hurd work till now Manolis Ragkousis
2014-03-22 14:16 ` Ludovic Courtès [this message]
2014-03-22 16:13 ` Manolis Ragkousis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=877g7mz5cp.fsf@gnu.org \
--to=ludo@gnu.org \
--cc=Guix-devel@gnu.org \
--cc=manolis837@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).