guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems.


From: Manolis Fragkiskos Ragkousis
Subject: 01/01: gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems.
Date: Wed, 11 Feb 2015 16:36:34 +0000

phant0mas pushed a commit to branch wip-hurd
in repository guix.

commit 426d69b89ed455ecc4d75b863cca44c152d113c8
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 |   30 ++++++++++++++++++++++++------
 1 files changed, 24 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index f881096..0498a3d 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -151,21 +151,39 @@ GCC that does not target a libc; otherwise, target that 
libc."
                  `(alist-cons-before
                    'configure 'set-cross-path
                    (lambda* (#:key inputs #:allow-other-keys)
-                     ;; Add the cross Linux headers to CROSS_CPATH, and remove
+                     ;; Add the cross kernel headers to CROSS_CPATH, and remove
                      ;; them from CPATH.
                      (let ((libc  (assoc-ref inputs "libc"))
                            (linux (assoc-ref inputs
-                                             "libc/cross-linux-headers")))
+                                             "libc/cross-linux-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)
-                             (string-prefix? linux 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:"
-                                              linux "/include"))
+                               (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"))
+                               (string-append libc "/lib"
+                                (if hurd-minimal
+                                    (string-append ":" hurd-minimal "/lib")
+                                    "")))
 
                        (let ((cpath   (search-path-as-string->list
                                        (getenv "CPATH")))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]