From: Manolis Ragkousis <manolis837@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel@gnu.org
Subject: [PATCH] gnu: base: Added macro for choosing glibc for target system
Date: Mon, 21 Apr 2014 20:39:15 +0300 [thread overview]
Message-ID: <CAFtzXzOOxuK+NEDWT4kmqZ1TpV+MB1-nn+VpNxqXQuKQwFJw4g@mail.gmail.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 189 bytes --]
I spent some time to find out why the glibc macro patch couldn't work
and it seems it just had to be defined before other packages tried to
inherit glibc in base.scm. It seems to work now.
[-- Attachment #2: gnu_add_glibc_macro.patch --]
[-- Type: text/x-patch, Size: 1994 bytes --]
From 1f35b5a3d93811dadac33dbce1ff74a704760a21 Mon Sep 17 00:00:00 2001
From: phant0mas <manolis837@gmail.com>
Date: Mon, 21 Apr 2014 20:13:52 +0300
Subject: [PATCH] gnu: base: Added macro for choosing glibc for target system
* gnu/packages/base.scm (glibc/linux): Renamed glibc to glibc/linux
* gnu/packages/base.scm (glibc-for-target): Choose which glibc to use
* gnu/packages/base.scm (glibc): Added macro to choose glibc
---
gnu/packages/base.scm | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index e6a2242..423c9c7 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -2,6 +2,7 @@
;;; Copyright © 2012, 2013, 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org>
;;; Copyright © 2014 Mark H Weaver <mhw@netris.org>
+;;; Copyright © 2014 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -41,7 +42,8 @@
#:use-module (guix utils)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
- #:use-module (ice-9 match))
+ #:use-module (ice-9 match)
+ #:export (glibc))
;;; Commentary:
;;;
@@ -364,7 +366,7 @@ library for working with executable and object formats is also included.")
(license gpl3+)
(home-page "http://www.gnu.org/software/binutils/")))
-(define-public glibc
+(define-public glibc/linux
(package
(name "glibc")
(version "2.19")
@@ -508,6 +510,16 @@ with the Linux kernel.")
(license lgpl2.0+)
(home-page "http://www.gnu.org/software/libc/")))
+(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 (or (%current-target-system) (%current-system)))))
+
(define-public tzdata
(package
(name "tzdata")
--
1.9.2
next reply other threads:[~2014-04-21 17:39 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-21 17:39 Manolis Ragkousis [this message]
2014-04-22 11:58 ` [PATCH] gnu: base: Added macro for choosing glibc for target system Ludovic Courtès
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=CAFtzXzOOxuK+NEDWT4kmqZ1TpV+MB1-nn+VpNxqXQuKQwFJw4g@mail.gmail.com \
--to=manolis837@gmail.com \
--cc=Guix-devel@gnu.org \
--cc=ludo@gnu.org \
/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).