[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
03/17: gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems.
From: |
Manolis Fragkiskos Ragkousis |
Subject: |
03/17: gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems. |
Date: |
Tue, 06 Oct 2015 17:44:23 +0000 |
phant0mas pushed a commit to branch wip-hurd
in repository guix.
commit a0a3b5476ee6a34f9d73c5edec02fee5c3520cee
Author: Marek Benc <address@hidden>
Date: Thu Feb 5 17:01:14 2015 +0100
gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems.
* gnu/packages/cross-base.scm (cross-gcc-arguments): Make 'set-cross-path
aware of the Hurd.
Signed-off-by: Manolis Ragkousis <address@hidden>
---
gnu/packages/cross-base.scm | 79 ++++++++++++++++++++++++++----------------
1 files changed, 49 insertions(+), 30 deletions(-)
diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 2f2022d..f3eb775 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -162,38 +162,57 @@ may be either a libc package or #f.)"
;; for cross-compilers.
(zero? (system* "make" "install-strip")))
,phases))))
- (if libc
- `(alist-cons-before
- 'configure 'set-cross-path
- (lambda* (#:key inputs #:allow-other-keys)
- ;; Add the cross Linux headers to CROSS_CPATH, and remove
them
- ;; from CPATH.
- (let ((libc (assoc-ref inputs "libc"))
- (linux (assoc-ref inputs "xlinux-headers")))
- (define (cross? x)
- ;; Return #t if X is a cross-libc or cross Linux.
- (or (string-prefix? libc x)
- (string-prefix? linux x)))
-
- (setenv "CROSS_CPATH"
- (string-append libc "/include:"
- linux "/include"))
- (setenv "CROSS_LIBRARY_PATH"
- (string-append libc "/lib"))
-
- (let ((cpath (search-path-as-string->list
- (getenv "CPATH")))
- (libpath (search-path-as-string->list
- (getenv "LIBRARY_PATH"))))
- (setenv "CPATH"
- (list->search-path-as-string
- (remove cross? cpath) ":"))
- (setenv "LIBRARY_PATH"
- (list->search-path-as-string
- (remove cross? libpath) ":"))
- #t)))
- ,phases)
- phases)))))))
+ (if libc
+ `(alist-cons-before
+ 'configure 'set-cross-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; Add the cross kernel headers to CROSS_CPATH, and remove
them
+ ;; from CPATH.
+ (let ((libc (assoc-ref inputs "libc"))
+ (linux (assoc-ref inputs
+ "xlinux-headers"))
+ (mach (assoc-ref inputs
+ "libc/cross-gnumach-headers"))
+ (hurd (assoc-ref inputs
+ "libc/cross-hurd-headers"))
+ (hurd-minimal (assoc-ref inputs
+ "libc/cross-hurd-minimal")))
+ (define (cross? x)
+ ;; Return #t if X is a cross-libc or cross Linux.
+ (or (string-prefix? libc x)
+ (if linux (string-prefix? linux x) #f)
+ (if hurd (string-prefix? hurd x) #f)
+ (if mach (string-prefix? mach x) #f)
+ (if hurd-minimal (string-prefix? hurd-minimal x) #f)))
+
+ (setenv "CROSS_CPATH"
+ (string-append libc "/include"
+ (if linux
+ (string-append ":" linux "/include")
+ "")
+ (if hurd
+ (string-append ":" hurd "/include"
+ ":" mach "/include")
+ "")))
+ (setenv "CROSS_LIBRARY_PATH"
+ (string-append libc "/lib"
+ (if hurd-minimal
+ (string-append ":" hurd-minimal "/lib")
+ "")))
+
+ (let ((cpath (search-path-as-string->list
+ (getenv "CPATH")))
+ (libpath (search-path-as-string->list
+ (getenv "LIBRARY_PATH"))))
+ (setenv "CPATH"
+ (list->search-path-as-string
+ (remove cross? cpath) ":"))
+ (setenv "LIBRARY_PATH"
+ (list->search-path-as-string
+ (remove cross? libpath) ":"))
+ #t)))
+ ,phases)
+ phases)))))))
(define (cross-gcc-patches target)
"Return GCC patches needed for TARGET."
- branch wip-hurd created (now 7718e0b), Manolis Fragkiskos Ragkousis, 2015/10/08
- 13/17: gnu: hurd: Add hurd-kernel-headers package., Manolis Fragkiskos Ragkousis, 2015/10/08
- 04/17: gnu: gcc: Also substitute the dynamic linker name for GNU (ie. Hurd) systems., Manolis Fragkiskos Ragkousis, 2015/10/08
- 03/17: gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems.,
Manolis Fragkiskos Ragkousis <=
- 12/17: gnu: base: Disable bogus code in Hurd's glibc., Manolis Fragkiskos Ragkousis, 2015/10/08
- 05/17: gnu: hurd: Pass --build to gnumach-headers when not cross building., Manolis Fragkiskos Ragkousis, 2015/10/08
- 15/17: gnu: cross-gcc, cross-libc: Use hurd-kernel-headers., Manolis Fragkiskos Ragkousis, 2015/10/08
- 06/17: gnu: hurd: Pass --build to hurd-headers when not cross building., Manolis Fragkiskos Ragkousis, 2015/10/08
- 10/17: gnu: base: Build glibc-hurd for i586-pc-gnu instead of i686-pc-gnu., Manolis Fragkiskos Ragkousis, 2015/10/08
- 11/17: gnu: make-bootstrap: Produce the correct %glibc-bootstrap-tarball for Hurd systems., Manolis Fragkiskos Ragkousis, 2015/10/08
- 09/17: gnu: cross-base: Build the correct cross-mig., Manolis Fragkiskos Ragkousis, 2015/10/08
- 14/17: gnu: glibc/hurd: Use hurd-kernel-headers package., Manolis Fragkiskos Ragkousis, 2015/10/08
- 17/17: gnu: glibc/hurd: Make glibc aware of "--with-headers" argument., Manolis Fragkiskos Ragkousis, 2015/10/08
- 16/17: gnu: base: Add libmachuser.so and libhurduser.so to libc.so's search path., Manolis Fragkiskos Ragkousis, 2015/10/08