all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in cross-gcc and cross-libc.
@ 2015-07-31 18:13 Manolis Ragkousis
  2015-08-01  9:35 ` Manolis Ragkousis
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-07-31 18:13 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0003-gnu-cross-base-Use-cross-kernel-headers-package-in-c.patch --]
[-- Type: text/x-patch, Size: 4981 bytes --]

From 3b80b9ba79194ee774a23070769b2e1e62e332da Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 21 Jul 2015 12:08:18 +0300
Subject: [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in
 cross-gcc and cross-libc.

* gnu/packages/cross-base.scm (cross-gcc): Add cross-kernel-headers procedure
  which return the headers needed for each kernel. Replace "xlinux-headers"
  input with "xkernel-headers" input.
  (cross-libc): Add "xkernel-headers" package. Replace Hurd's cross-libc propagated
  inputs with "kernel-headers".
---
 gnu/packages/cross-base.scm | 56 +++++++++++++++++++++++++++++++++++----------
 1 file changed, 44 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2e4bd03..d019f5d 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -226,6 +226,15 @@ may be either a libc package or #f.)"
   "Return a cross-compiler for TARGET, where TARGET is a GNU triplet.  Use
 XBINUTILS as the associated cross-Binutils.  If LIBC is false, then build a
 GCC that does not target a libc; otherwise, target that libc."
+  
+  (define (cross-kernel-headers target libc)
+    "Return headers depending on TARGET."
+    (match target
+      ("i586-pc-gnu"
+       (assoc-ref (package-propagated-inputs libc) "kernel-headers"))
+      (_
+       (assoc-ref (package-propagated-inputs libc) "linux-headers"))))
+  
   (package (inherit %xgcc)
     (name (string-append "gcc-cross-"
                          (if libc "" "sans-libc-")
@@ -267,9 +276,8 @@ GCC that does not target a libc; otherwise, target that libc."
                                (alist-delete "libc" %final-inputs))))
            (if libc
                `(("libc" ,libc)
-                 ("xlinux-headers"                ;the target headers
-                  ,@(assoc-ref (package-propagated-inputs libc)
-                               "linux-headers"))
+                 ("xkernel-headers"                ;the target headers
+                  ,@(cross-kernel-headers target libc))
                  ,@inputs)
                inputs))))
 
@@ -399,6 +407,35 @@ XBINUTILS and the cross tool chain."
                        ("cross-mig" ,xmig)
                        ,@(alist-delete "mig"(package-native-inputs hurd-minimal))))))
 
+  (define xkernel-headers
+    (package (inherit kernel-headers)
+      (name (string-append (package-name kernel-headers)
+                           "-cross-" target))
+
+      (arguments
+       (substitute-keyword-arguments (package-arguments kernel-headers)
+         ((#:phases phases)
+          `(alist-cons-before
+            'pre-configure 'set-cross-headers-path
+            (lambda* (#:key inputs #:allow-other-keys)
+              (let ((mach (assoc-ref inputs "gnumach-headers"))
+                    (hurd (assoc-ref inputs "hurd-headers"))
+                    (hurd-minimal (assoc-ref inputs "hurd-minimal")))
+                (setenv "CROSS_CPATH"
+                        (string-append mach "/include:"
+                                       hurd "/include"))
+                (setenv "CROSS_LIBRARY_PATH"
+                        (string-append hurd-minimal "/lib:"))))
+            ,phases))))
+
+      (propagated-inputs `(("gnumach-headers" ,xgnumach-headers)
+                           ("hurd-headers" ,xhurd-headers)
+                           ("hurd-minimal" ,xhurd-minimal)))
+
+      (native-inputs `(("cross-gcc" ,xgcc)
+                       ("cross-binutils" ,xbinutils)
+                       ,@(package-native-inputs kernel-headers)))))
+
   ;; Choose libc based on target
   (match target
     ("i586-pc-gnu"
@@ -410,19 +447,14 @@ XBINUTILS and the cross tool chain."
            `(alist-cons-before
              'pre-configure 'set-cross-hurd-headers-path
              (lambda* (#:key inputs #:allow-other-keys)
-               (let ((mach (assoc-ref inputs "cross-gnumach-headers"))
-                     (hurd (assoc-ref inputs "cross-hurd-headers"))
-                     (hurd-minimal (assoc-ref inputs "cross-hurd-minimal")))
+               (let ((kernel (assoc-ref inputs "kernel-headers")))
                  (setenv "CROSS_CPATH"
-                         (string-append mach "/include:"
-                                        hurd "/include"))
+                         (string-append kernel "/include"))
                  (setenv "CROSS_LIBRARY_PATH"
-                         (string-append hurd-minimal "/lib:"))))
+                         (string-append kernel "/lib:"))))
              ,phases))))
 
-       (propagated-inputs `(("cross-gnumach-headers" ,xgnumach-headers)
-                            ("cross-hurd-headers" ,xhurd-headers)
-                            ("cross-hurd-minimal" ,xhurd-minimal)))
+       (propagated-inputs `(("kernel-headers" ,xkernel-headers)))
 
        (native-inputs `(("cross-gcc" ,xgcc)
                         ("cross-binutils" ,xbinutils)
-- 
2.4.6


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in cross-gcc and cross-libc.
  2015-07-31 18:13 [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in cross-gcc and cross-libc Manolis Ragkousis
@ 2015-08-01  9:35 ` Manolis Ragkousis
  2015-08-09 15:10   ` Manolis Ragkousis
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-08-01  9:35 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 15 bytes --]

Updated patch.

[-- Attachment #2: 0003-gnu-cross-base-Use-cross-kernel-headers-package-in-c.patch --]
[-- Type: text/x-patch, Size: 4194 bytes --]

From 767aacfbd5e9c5fdae44d6b44a49bbef323f355a Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 21 Jul 2015 12:08:18 +0300
Subject: [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in
 cross-gcc and cross-libc.

* gnu/packages/cross-base.scm (cross-gcc): Add cross-kernel-headers procedure
  which return the headers needed for each kernel. Replace "xlinux-headers"
  input with "xkernel-headers" input.
  (cross-libc): Add "xkernel-headers" package. Replace Hurd's cross-libc propagated
  inputs with "kernel-headers".
---
 gnu/packages/cross-base.scm | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2e4bd03..90cd12a 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -226,6 +226,15 @@ may be either a libc package or #f.)"
   "Return a cross-compiler for TARGET, where TARGET is a GNU triplet.  Use
 XBINUTILS as the associated cross-Binutils.  If LIBC is false, then build a
 GCC that does not target a libc; otherwise, target that libc."
+  
+  (define (cross-kernel-headers target libc)
+    "Return headers depending on TARGET."
+    (match target
+      ("i586-pc-gnu"
+       (assoc-ref (package-propagated-inputs libc) "kernel-headers"))
+      (_
+       (assoc-ref (package-propagated-inputs libc) "linux-headers"))))
+  
   (package (inherit %xgcc)
     (name (string-append "gcc-cross-"
                          (if libc "" "sans-libc-")
@@ -267,9 +276,8 @@ GCC that does not target a libc; otherwise, target that libc."
                                (alist-delete "libc" %final-inputs))))
            (if libc
                `(("libc" ,libc)
-                 ("xlinux-headers"                ;the target headers
-                  ,@(assoc-ref (package-propagated-inputs libc)
-                               "linux-headers"))
+                 ("xkernel-headers"                ;the target headers
+                  ,@(cross-kernel-headers target libc))
                  ,@inputs)
                inputs))))
 
@@ -399,6 +407,19 @@ XBINUTILS and the cross tool chain."
                        ("cross-mig" ,xmig)
                        ,@(alist-delete "mig"(package-native-inputs hurd-minimal))))))
 
+  (define xkernel-headers
+    (package (inherit kernel-headers)
+      (name (string-append (package-name kernel-headers)
+                           "-cross-" target))
+
+      (inputs `(("gnumach-headers" ,xgnumach-headers)
+                ("hurd-headers" ,xhurd-headers)
+                ("hurd-minimal" ,xhurd-minimal)))
+
+      (native-inputs `(("cross-gcc" ,xgcc)
+                       ("cross-binutils" ,xbinutils)
+                       ,@(package-native-inputs kernel-headers)))))
+
   ;; Choose libc based on target
   (match target
     ("i586-pc-gnu"
@@ -410,19 +431,14 @@ XBINUTILS and the cross tool chain."
            `(alist-cons-before
              'pre-configure 'set-cross-hurd-headers-path
              (lambda* (#:key inputs #:allow-other-keys)
-               (let ((mach (assoc-ref inputs "cross-gnumach-headers"))
-                     (hurd (assoc-ref inputs "cross-hurd-headers"))
-                     (hurd-minimal (assoc-ref inputs "cross-hurd-minimal")))
+               (let ((kernel (assoc-ref inputs "kernel-headers")))
                  (setenv "CROSS_CPATH"
-                         (string-append mach "/include:"
-                                        hurd "/include"))
+                         (string-append kernel "/include"))
                  (setenv "CROSS_LIBRARY_PATH"
-                         (string-append hurd-minimal "/lib:"))))
+                         (string-append kernel "/lib:"))))
              ,phases))))
 
-       (propagated-inputs `(("cross-gnumach-headers" ,xgnumach-headers)
-                            ("cross-hurd-headers" ,xhurd-headers)
-                            ("cross-hurd-minimal" ,xhurd-minimal)))
+       (propagated-inputs `(("kernel-headers" ,xkernel-headers)))
 
        (native-inputs `(("cross-gcc" ,xgcc)
                         ("cross-binutils" ,xbinutils)
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in cross-gcc and cross-libc.
  2015-08-01  9:35 ` Manolis Ragkousis
@ 2015-08-09 15:10   ` Manolis Ragkousis
  2015-08-10 22:10     ` Mark H Weaver
  0 siblings, 1 reply; 4+ messages in thread
From: Manolis Ragkousis @ 2015-08-09 15:10 UTC (permalink / raw)
  To: Guix-devel

[-- Attachment #1: Type: text/plain, Size: 15 bytes --]

Updated patch.

[-- Attachment #2: 0001-gnu-cross-base-Use-cross-kernel-headers-package-in-c.patch --]
[-- Type: text/x-patch, Size: 4230 bytes --]

From ae549c0d7a7952a37d4c164ec2c920328a30d79a Mon Sep 17 00:00:00 2001
From: Manolis Ragkousis <manolis837@gmail.com>
Date: Tue, 21 Jul 2015 12:08:18 +0300
Subject: [PATCH] gnu: cross-base: Use cross-kernel-headers package in
 cross-gcc and cross-libc.

* gnu/packages/cross-base.scm (cross-gcc): Add cross-kernel-headers procedure
  which return the headers needed for each kernel. Replace "xlinux-headers"
  input with "xkernel-headers" input.
  (cross-libc): Add "xkernel-headers" package. Replace Hurd's cross-libc propagated
  inputs with "kernel-headers".
---
 gnu/packages/cross-base.scm | 40 ++++++++++++++++++++++++++++------------
 1 file changed, 28 insertions(+), 12 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2e4bd03..61adfcf 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -226,6 +226,15 @@ may be either a libc package or #f.)"
   "Return a cross-compiler for TARGET, where TARGET is a GNU triplet.  Use
 XBINUTILS as the associated cross-Binutils.  If LIBC is false, then build a
 GCC that does not target a libc; otherwise, target that libc."
+  
+  (define (cross-kernel-headers target libc)
+    "Return headers depending on TARGET."
+    (match target
+      ("i586-pc-gnu"
+       (assoc-ref (package-propagated-inputs libc) "hurd-kernel-headers"))
+      (_
+       (assoc-ref (package-propagated-inputs libc) "linux-headers"))))
+  
   (package (inherit %xgcc)
     (name (string-append "gcc-cross-"
                          (if libc "" "sans-libc-")
@@ -267,9 +276,8 @@ GCC that does not target a libc; otherwise, target that libc."
                                (alist-delete "libc" %final-inputs))))
            (if libc
                `(("libc" ,libc)
-                 ("xlinux-headers"                ;the target headers
-                  ,@(assoc-ref (package-propagated-inputs libc)
-                               "linux-headers"))
+                 ("xkernel-headers"                ;the target headers
+                  ,@(cross-kernel-headers target libc))
                  ,@inputs)
                inputs))))
 
@@ -399,6 +407,19 @@ XBINUTILS and the cross tool chain."
                        ("cross-mig" ,xmig)
                        ,@(alist-delete "mig"(package-native-inputs hurd-minimal))))))
 
+  (define xhurd-kernel-headers
+    (package (inherit hurd-kernel-headers)
+      (name (string-append (package-name hurd-kernel-headers)
+                           "-cross-" target))
+
+      (inputs `(("gnumach-headers" ,xgnumach-headers)
+                ("hurd-headers" ,xhurd-headers)
+                ("hurd-minimal" ,xhurd-minimal)))
+
+      (native-inputs `(("cross-gcc" ,xgcc)
+                       ("cross-binutils" ,xbinutils)
+                       ,@(package-native-inputs hurd-kernel-headers)))))
+
   ;; Choose libc based on target
   (match target
     ("i586-pc-gnu"
@@ -410,19 +431,14 @@ XBINUTILS and the cross tool chain."
            `(alist-cons-before
              'pre-configure 'set-cross-hurd-headers-path
              (lambda* (#:key inputs #:allow-other-keys)
-               (let ((mach (assoc-ref inputs "cross-gnumach-headers"))
-                     (hurd (assoc-ref inputs "cross-hurd-headers"))
-                     (hurd-minimal (assoc-ref inputs "cross-hurd-minimal")))
+               (let ((kernel (assoc-ref inputs "hurd-kernel-headers")))
                  (setenv "CROSS_CPATH"
-                         (string-append mach "/include:"
-                                        hurd "/include"))
+                         (string-append kernel "/include"))
                  (setenv "CROSS_LIBRARY_PATH"
-                         (string-append hurd-minimal "/lib:"))))
+                         (string-append kernel "/lib:"))))
              ,phases))))
 
-       (propagated-inputs `(("cross-gnumach-headers" ,xgnumach-headers)
-                            ("cross-hurd-headers" ,xhurd-headers)
-                            ("cross-hurd-minimal" ,xhurd-minimal)))
+       (propagated-inputs `(("hurd-kernel-headers" ,xhurd-kernel-headers)))
 
        (native-inputs `(("cross-gcc" ,xgcc)
                         ("cross-binutils" ,xbinutils)
-- 
2.5.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in cross-gcc and cross-libc.
  2015-08-09 15:10   ` Manolis Ragkousis
@ 2015-08-10 22:10     ` Mark H Weaver
  0 siblings, 0 replies; 4+ messages in thread
From: Mark H Weaver @ 2015-08-10 22:10 UTC (permalink / raw)
  To: Manolis Ragkousis; +Cc: Guix-devel

Manolis Ragkousis <manolis837@gmail.com> writes:

> From ae549c0d7a7952a37d4c164ec2c920328a30d79a Mon Sep 17 00:00:00 2001
> From: Manolis Ragkousis <manolis837@gmail.com>
> Date: Tue, 21 Jul 2015 12:08:18 +0300
> Subject: [PATCH] gnu: cross-base: Use cross-kernel-headers package in
>  cross-gcc and cross-libc.

How about something like this for the summary line:

gnu: cross-gcc, cross-libc: Use hurd-kernel-headers.

> * gnu/packages/cross-base.scm (cross-gcc): Add cross-kernel-headers procedure
>   which return the headers needed for each kernel. Replace "xlinux-headers"

s/return/returns/ and two spaces between sentences please.

>   input with "xkernel-headers" input.
>   (cross-libc): Add "xkernel-headers" package. Replace Hurd's cross-libc propagated

Ditto.

>   inputs with "kernel-headers".

Okay to push to wip-hurd with these changes.

     Thanks!
       Mark

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2015-08-10 22:10 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-31 18:13 [PATCH 3/3] gnu: cross-base: Use cross-kernel-headers package in cross-gcc and cross-libc Manolis Ragkousis
2015-08-01  9:35 ` Manolis Ragkousis
2015-08-09 15:10   ` Manolis Ragkousis
2015-08-10 22:10     ` Mark H Weaver

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.