all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Manolis Ragkousis <manolis837@gmail.com>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix-devel <Guix-devel@gnu.org>
Subject: Re: [PATCH 2/4] gnu: cross-base: Make it aware of non-Linux (ie. Hurd)
Date: Tue, 10 Feb 2015 16:20:21 +0200	[thread overview]
Message-ID: <CAFtzXzPb-gH6ZnZDqY_pShp3pW_z9ZEoHvXEqbLm6aNSnFNmGQ@mail.gmail.com> (raw)
In-Reply-To: <871tm1xqcw.fsf@gnu.org>

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

Ludo is this okay to push?

Wrapped lines to 80 chars.

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

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

diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm
index f881096..8929f7f 100644
--- a/gnu/packages/cross-base.scm
+++ b/gnu/packages/cross-base.scm
@@ -151,21 +151,36 @@ 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")))
-- 
2.3.0


  reply	other threads:[~2015-02-10 14:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-05 16:27 [PATCH 2/4] gnu: cross-base: Make it aware of non-Linux (ie. Hurd) Marek Benc
2015-02-07 23:18 ` Ludovic Courtès
2015-02-10 14:20   ` Manolis Ragkousis [this message]
2015-02-10 16:25     ` Ludovic Courtès
2015-02-10 16:37       ` Marek Benc
2015-02-10 17:09         ` Ludovic Courtès
2015-02-11 16:39           ` Manolis Ragkousis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFtzXzPb-gH6ZnZDqY_pShp3pW_z9ZEoHvXEqbLm6aNSnFNmGQ@mail.gmail.com \
    --to=manolis837@gmail.com \
    --cc=Guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.