* [PATCH] gnu: base: Added macro for choosing glibc for target system
@ 2014-04-21 17:39 Manolis Ragkousis
2014-04-22 11:58 ` Ludovic Courtès
0 siblings, 1 reply; 2+ messages in thread
From: Manolis Ragkousis @ 2014-04-21 17:39 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: Guix-devel
[-- 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
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] gnu: base: Added macro for choosing glibc for target system
2014-04-21 17:39 [PATCH] gnu: base: Added macro for choosing glibc for target system Manolis Ragkousis
@ 2014-04-22 11:58 ` Ludovic Courtès
0 siblings, 0 replies; 2+ messages in thread
From: Ludovic Courtès @ 2014-04-22 11:58 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: Guix-devel
Manolis Ragkousis <manolis837@gmail.com> skribis:
> 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.
Yes, indeed (sorry I didn’t catch it before!).
The patch looks good to me, but it doesn’t apply on ‘master’ since it
depends on bits that haven’t been committed yet.
I think we should start working on the integration of your work. A good
candidate for a first patch would be the ‘glibc-hurd-headers’ package, I
think.
Minor details:
> From 1f35b5a3d93811dadac33dbce1ff74a704760a21 Mon Sep 17 00:00:00 2001
> From: phant0mas <manolis837@gmail.com>
Should be your real name (or not?)?
> 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
No need to repeat the file name here (see the GNU Coding Standards or
the log for details.)
> +(define (glibc-for-target target)
> + "Return the glibc for TARGET, glibc/linux for a linux host or
> +glibc/hurd for a hurd host"
Spelling: “Linux” and “Hurd”.
> +(define-syntax glibc
> + (identifier-syntax (glibc-for-target (or (%current-target-system) (%current-system)))))
Insert a newline to remain below 80 columns.
Thanks!
Ludo’.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-22 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-21 17:39 [PATCH] gnu: base: Added macro for choosing glibc for target system Manolis Ragkousis
2014-04-22 11:58 ` Ludovic Courtès
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).