aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2015-07-19 00:15:44 +0200
committerLudovic Courtès <ludo@gnu.org>2015-07-19 00:15:44 +0200
commitaa27987f71cb8afa698ede551e20b1248f160113 (patch)
treeed6f3cc1e79aa849db010f21debccde09a04f9e4
parent2e839545c7f363b50ae760c9b9c15da9e7619da9 (diff)
downloadguix-aa27987f71cb8afa698ede551e20b1248f160113.tar
guix-aa27987f71cb8afa698ede551e20b1248f160113.tar.gz
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.
-rw-r--r--gnu/packages/cross-base.scm5
1 files changed, 4 insertions, 1 deletions
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 @@ may be either a libc package or #f.)"
;; 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 @@ GCC that does not target a libc; otherwise, target that libc."
(alist-delete "libc" %final-inputs))))
(if libc
`(("libc" ,libc)
+ ("xlinux-headers" ;the target headers
+ ,@(assoc-ref (package-propagated-inputs libc)
+ "linux-headers"))
,@inputs)
inputs))))