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.
This commit is contained in:
Ludovic Courtès 2015-07-19 00:15:44 +02:00
parent 2e839545c7
commit aa27987f71
1 changed files with 4 additions and 1 deletions

View File

@ -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))))