From aa27987f71cb8afa698ede551e20b1248f160113 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sun, 19 Jul 2015 00:15:44 +0200 Subject: gnu: cross-base: Distinguish cross Linux headers from native headers. Commit c6d33a9 provided an incorrect fix, whereby the "linux-headers" key would be used twice in %BUILD-INPUTS and the 'set-cross-path' phase would refer to the first one of them, which happened to be the native headers, and not the target headers. This patch solves the problem by removing the ambiguity. * gnu/packages/cross-base.scm (cross-gcc-arguments)[set-cross-path]: Remove to "xlinux-headers" instead of "linux-headers". (cross-gcc): When LIBC is true, add explicit "xlinux-headers" input, taken from LIBC's propagated inputs. --- gnu/packages/cross-base.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gnu/packages/cross-base.scm') diff --git a/gnu/packages/cross-base.scm b/gnu/packages/cross-base.scm index 712aa9d585..eda44cea41 100644 --- a/gnu/packages/cross-base.scm +++ b/gnu/packages/cross-base.scm @@ -165,7 +165,7 @@ (define (cross-gcc-arguments target libc) ;; Add the cross Linux headers to CROSS_CPATH, and remove them ;; from CPATH. (let ((libc (assoc-ref inputs "libc")) - (linux (assoc-ref inputs "linux-headers"))) + (linux (assoc-ref inputs "xlinux-headers"))) (define (cross? x) ;; Return #t if X is a cross-libc or cross Linux. (or (string-prefix? libc x) @@ -244,6 +244,9 @@ (define* (cross-gcc target (alist-delete "libc" %final-inputs)))) (if libc `(("libc" ,libc) + ("xlinux-headers" ;the target headers + ,@(assoc-ref (package-propagated-inputs libc) + "linux-headers")) ,@inputs) inputs)))) -- cgit v1.2.3