From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marek Benc Subject: [PATCH 2/4] gnu: cross-base: Make it aware of non-Linux (ie. Hurd) Date: Thu, 05 Feb 2015 17:27:55 +0100 Message-ID: <54D39A0B.5090409@gmx.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------000205090400000105040106" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:33537) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YJPHd-0002xL-48 for guix-devel@gnu.org; Thu, 05 Feb 2015 11:28:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YJPHc-00031s-9G for guix-devel@gnu.org; Thu, 05 Feb 2015 11:28:01 -0500 List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: =?UTF-8?B?THVkb3ZpYyBDb3VydMOocw==?= Cc: guix-devel@gnu.org This is a multi-part message in MIME format. --------------000205090400000105040106 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit This fixes the problem Manolis was facing earlier, with string-append getting an #f argument. -- Marek. --------------000205090400000105040106 Content-Type: text/x-patch; name="git-patch-2.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="git-patch-2.patch" >From 4dc55bfe59bf60c4f55a7e54da2f5ee17589ff9e Mon Sep 17 00:00:00 2001 From: Marek Benc 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 | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index e051756..1ebe862 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -129,23 +129,34 @@ 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/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 a cross-kernel. (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.2.1 --------------000205090400000105040106--