[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
15/20: gnu: cross-gcc, cross-libc: Use hurd-kernel-headers.
From: |
Manolis Fragkiskos Ragkousis |
Subject: |
15/20: gnu: cross-gcc, cross-libc: Use hurd-kernel-headers. |
Date: |
Thu, 11 Feb 2016 13:41:47 +0000 |
phant0mas pushed a commit to branch wip-hurd
in repository guix.
commit 06d1e6e45225b3a6775c92d54d26488ec2ecf7e7
Author: Manolis Ragkousis <address@hidden>
Date: Tue Jul 21 12:08:18 2015 +0300
gnu: cross-gcc, cross-libc: Use hurd-kernel-headers.
* gnu/packages/cross-base.scm (cross-gcc): Add cross-kernel-headers
procedure
which returns 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 "hurd-kernel-headers".
---
gnu/packages/cross-base.scm | 40 ++++++++++++++++++++++++++++------------
1 files changed, 28 insertions(+), 12 deletions(-)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 30f39c3..c46a0bc 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -227,6 +227,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-")
@@ -268,9 +277,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))))
@@ -400,6 +408,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"
@@ -411,19 +432,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)
- 05/20: gnu: hurd: Pass --build to gnumach-headers when not cross building., (continued)
- 05/20: gnu: hurd: Pass --build to gnumach-headers when not cross building., Manolis Fragkiskos Ragkousis, 2016/02/11
- 06/20: gnu: hurd: Pass --build to hurd-headers when not cross building., Manolis Fragkiskos Ragkousis, 2016/02/11
- 07/20: gnu: base: Updated glibc-hurd to 2.19 and removed patches., Manolis Fragkiskos Ragkousis, 2016/02/11
- 08/20: gnu: base: Added glibc-for-target macro., Manolis Fragkiskos Ragkousis, 2016/02/11
- 09/20: gnu: cross-base: Build the correct cross-mig., Manolis Fragkiskos Ragkousis, 2016/02/11
- 10/20: gnu: base: Build glibc-hurd for i586-pc-gnu instead of i686-pc-gnu., Manolis Fragkiskos Ragkousis, 2016/02/11
- 11/20: gnu: make-bootstrap: Produce the correct %glibc-bootstrap-tarball for Hurd systems., Manolis Fragkiskos Ragkousis, 2016/02/11
- 12/20: gnu: base: Disable bogus code in Hurd's glibc., Manolis Fragkiskos Ragkousis, 2016/02/11
- 13/20: gnu: hurd: Add hurd-kernel-headers package., Manolis Fragkiskos Ragkousis, 2016/02/11
- 14/20: gnu: glibc/hurd: Use hurd-kernel-headers package., Manolis Fragkiskos Ragkousis, 2016/02/11
- 15/20: gnu: cross-gcc, cross-libc: Use hurd-kernel-headers.,
Manolis Fragkiskos Ragkousis <=
- 16/20: gnu: base: Add libmachuser.so and libhurduser.so to libc.so's search path., Manolis Fragkiskos Ragkousis, 2016/02/11
- 17/20: gnu: glibc/hurd: Make glibc aware of "--with-headers" argument., Manolis Fragkiskos Ragkousis, 2016/02/11
- 18/20: gnu: commencement: Add support for a native GNU/Hurd system., Manolis Fragkiskos Ragkousis, 2016/02/11
- 19/20: gnu: glibc-hurd: Update to 20151031., Manolis Fragkiskos Ragkousis, 2016/02/11
- 20/20: gnu: glibc/linux: Rename linux-headers input to kernel-headers., Manolis Fragkiskos Ragkousis, 2016/02/11