build-system/gnu: Check whether the cross-libc has a "static" output.

This is a followup to 614fffe427, which
broke cross-compilation to i686-w64-mingw32.

* guix/build-system/gnu.scm (standard-cross-packages): Add
"cross-libc:static" only when LIBC has a "static" output.
This commit is contained in:
Ludovic Courtès 2017-12-21 10:46:24 +01:00
parent 8d6cd08573
commit d2b5ede053
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 6 additions and 2 deletions

View File

@ -416,7 +416,11 @@ is one of `host' or `target'."
((target) ((target)
(let ((libc (libc target))) (let ((libc (libc target)))
`(("cross-libc" ,libc) `(("cross-libc" ,libc)
("cross-libc:static" ,libc "static"))))))))
;; MinGW's libc doesn't have a "static" output.
,@(if (member "static" (package-outputs libc))
`(("cross-libc:static" ,libc "static"))
'()))))))))
(define* (gnu-cross-build store name (define* (gnu-cross-build store name
#:key #:key