unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH 4/4] gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems.
@ 2015-02-14 15:40 Manolis Ragkousis
  0 siblings, 0 replies; only message in thread
From: Manolis Ragkousis @ 2015-02-14 15:40 UTC (permalink / raw)
  To: Ludovic Courtès, mhw; +Cc: Guix-devel

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

Nothing changed here. Just rebased on top of master.

[-- Attachment #2: 0004-gnu-cross-base-Make-it-aware-of-non-Linux-ie.-Hurd-s.patch --]
[-- Type: text/x-patch, Size: 3224 bytes --]

From 8ca7aa643645d4b0b970bd362f2c023ba5f23bc7 Mon Sep 17 00:00:00 2001
From: Marek Benc <dusxmt@gmx.com>
Date: Thu, 5 Feb 2015 17:01:14 +0100
Subject: [PATCH 4/4] 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 <manolis837@gmail.com>
---
 gnu/packages/cross-base.scm | 30 ++++++++++++++++++++++++------
 1 file changed, 24 insertions(+), 6 deletions(-)

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index 4a3bae2..eb5f369 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -143,21 +143,39 @@ may be either a libc package or #f.)"
              `(alist-cons-before
                'configure 'set-cross-path
                (lambda* (#:key inputs #:allow-other-keys)
-                 ;; Add the cross Linux headers to CROSS_CPATH, and remove them
+                 ;; Add the cross kernel headers to CROSS_CPATH, and remove them
                  ;; from CPATH.
                  (let ((libc  (assoc-ref inputs "libc"))
                        (linux (assoc-ref inputs
-                                         "libc/linux-headers")))
+                                         "libc/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")))
-- 
2.3.0


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-14 15:40 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-14 15:40 [PATCH 4/4] gnu: cross-base: Make it aware of non-Linux (ie. Hurd) systems Manolis Ragkousis

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).