From mboxrd@z Thu Jan 1 00:00:00 1970 From: Manolis Ragkousis Subject: [PATCH] gnu: cross-libc: Use the correct libc. Date: Thu, 11 Aug 2016 21:56:27 +0300 Message-ID: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------BDD76B30A1A08B919A8964B4" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48138) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bXv9i-00018C-2B for guix-devel@gnu.org; Thu, 11 Aug 2016 14:56:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bXv9g-00050r-C1 for guix-devel@gnu.org; Thu, 11 Aug 2016 14:56:37 -0400 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" To: guix-devel This is a multi-part message in MIME format. --------------BDD76B30A1A08B919A8964B4 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Hello everyone, I noticed that in commit ef21276053b980 from core-updates-next I am using (cross-libc-for-target ...) only in one place while I should have used (let ((libc (cross-libc-for-target target))) (package ... With this patch I fix this. Thank you, Manolis --------------BDD76B30A1A08B919A8964B4 Content-Type: text/x-patch; name="0001-gnu-cross-libc-Use-the-correct-libc.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="0001-gnu-cross-libc-Use-the-correct-libc.patch" =46rom b0481b1af1ea64cdfc1dcac6f2c1f9a24dc9a70b Mon Sep 17 00:00:00 2001 From: Manolis Ragkousis Date: Thu, 11 Aug 2016 21:28:00 +0300 Subject: [PATCH] gnu: cross-libc: Use the correct libc. * gnu/packages/cross-base.scm (cross-libc): Use cross-libc-for-target to determine the correct libc to use. --- gnu/packages/cross-base.scm | 102 ++++++++++++++++++++++----------------= ------ 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index b4324c2..1524451 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -464,62 +464,62 @@ XBINUTILS and the cross tool chain." ((or "i586-pc-gnu" "i586-gnu") glibc/hurd) (_ glibc/linux))) =20 - (package (inherit glibc) - (name (string-append "glibc-cross-" target)) - (arguments - (substitute-keyword-arguments - `(;; Disable stripping (see above.) - #:strip-binaries? #f + ;; Use (cross-libc-for-target ...) to determine the correct libc to us= e. + (let ((libc (cross-libc-for-target target))) + (package (inherit libc) + (name (string-append "glibc-cross-" target)) + (arguments + (substitute-keyword-arguments + `(;; Disable stripping (see above.) + #:strip-binaries? #f =20 - ;; This package is used as a target input, but it should not = have - ;; the usual cross-compilation inputs since that would includ= e - ;; itself. - #:implicit-cross-inputs? #f + ;; This package is used as a target input, but it should no= t have + ;; the usual cross-compilation inputs since that would incl= ude + ;; itself. + #:implicit-cross-inputs? #f =20 - ;; We need SRFI 26. - #:modules ((guix build gnu-build-system) - (guix build utils) - (srfi srfi-26)) + ;; We need SRFI 26. + #:modules ((guix build gnu-build-system) + (guix build utils) + (srfi srfi-26)) =20 - ;; Package-arguments does not use the correct libc, so we use= - ;; (cross-libc-for-target ...) to determine the correct one. - ,@(package-arguments (cross-libc-for-target target))) - ((#:configure-flags flags) - `(cons ,(string-append "--host=3D" target) + ,@(package-arguments libc)) + ((#:configure-flags flags) + `(cons ,(string-append "--host=3D" target) ,flags)) - ((#:phases phases) - `(alist-cons-before - 'configure 'set-cross-kernel-headers-path - (lambda* (#:key inputs #:allow-other-keys) - (let* ((kernel (assoc-ref inputs "kernel-headers")) - (cpath (string-append kernel "/include"))) - (for-each (cut setenv <> cpath) - '("CROSS_C_INCLUDE_PATH" - "CROSS_CPLUS_INCLUDE_PATH" - "CROSS_OBJC_INCLUDE_PATH" - "CROSS_OBJCPLUS_INCLUDE_PATH")) - (setenv "CROSS_LIBRARY_PATH" - (string-append kernel "/lib")) ;for Hurd's libihas= h - #t)) - ,phases)))) - - ;; Shadow the native "kernel-headers" because glibc's recipe expects= the - ;; "kernel-headers" input to point to the right thing. - (propagated-inputs `(("kernel-headers" ,xheaders))) - - ;; FIXME: 'static-bash' should really be an input, not a native inpu= t, but - ;; to do that will require building an intermediate cross libc. - (inputs '()) + ((#:phases phases) + `(alist-cons-before + 'configure 'set-cross-kernel-headers-path + (lambda* (#:key inputs #:allow-other-keys) + (let* ((kernel (assoc-ref inputs "kernel-headers")) + (cpath (string-append kernel "/include"))) + (for-each (cut setenv <> cpath) + '("CROSS_C_INCLUDE_PATH" + "CROSS_CPLUS_INCLUDE_PATH" + "CROSS_OBJC_INCLUDE_PATH" + "CROSS_OBJCPLUS_INCLUDE_PATH")) + (setenv "CROSS_LIBRARY_PATH" + (string-append kernel "/lib")) ;for Hurd's libih= ash + #t)) + ,phases)))) + + ;; Shadow the native "kernel-headers" because glibc's recipe expec= ts the + ;; "kernel-headers" input to point to the right thing. + (propagated-inputs `(("kernel-headers" ,xheaders))) + + ;; FIXME: 'static-bash' should really be an input, not a native in= put, but + ;; to do that will require building an intermediate cross libc. + (inputs '()) =20 - (native-inputs `(("cross-gcc" ,xgcc) - ("cross-binutils" ,xbinutils) - ,@(if (string-match (or "i586-pc-gnu" "i586-gnu") t= arget) - `(("cross-mig" - ,@(assoc-ref (package-native-inputs xheade= rs) - "cross-mig"))) - '()) - ,@(package-inputs glibc) ;FIXME: static-bash - ,@(package-native-inputs glibc))))) + (native-inputs `(("cross-gcc" ,xgcc) + ("cross-binutils" ,xbinutils) + ,@(if (string-match (or "i586-pc-gnu" "i586-gnu")= target) + `(("cross-mig" + ,@(assoc-ref (package-native-inputs xhea= ders) + "cross-mig"))) + '()) + ,@(package-inputs libc) ;FIXME: static-bash + ,@(package-native-inputs libc)))))) =20 =0C ;;; --=20 2.9.2 --------------BDD76B30A1A08B919A8964B4--