gnu: cross-base: Allow using non-default glibc.
* gnu/packages/cross-base.scm (cross-libc, native-libc, cross-newlib?): Add 'libc' optional argument to specify using a non-default glibc package. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
This commit is contained in:
parent
d815728525
commit
102d307520
|
@ -422,14 +422,15 @@ target that libc."
|
|||
|
||||
(define* (cross-libc target
|
||||
#:optional
|
||||
(libc glibc)
|
||||
(xgcc (cross-gcc target))
|
||||
(xbinutils (cross-binutils target))
|
||||
(xheaders (cross-kernel-headers target)))
|
||||
"Return a libc cross-built for TARGET, a GNU triplet. Use XGCC and
|
||||
XBINUTILS and the cross tool chain."
|
||||
(if (cross-newlib? target)
|
||||
(native-libc target)
|
||||
(let ((libc glibc))
|
||||
"Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS
|
||||
and the cross tool chain."
|
||||
(if (cross-newlib? target libc)
|
||||
(native-libc target libc)
|
||||
(let ((libc libc))
|
||||
(package (inherit libc)
|
||||
(name (string-append "glibc-cross-" target))
|
||||
(arguments
|
||||
|
@ -502,13 +503,17 @@ XBINUTILS and the cross tool chain."
|
|||
,@(package-inputs libc) ;FIXME: static-bash
|
||||
,@(package-native-inputs libc)))))))
|
||||
|
||||
(define (native-libc target)
|
||||
(define* (native-libc target
|
||||
#:optional
|
||||
(libc glibc))
|
||||
(if (target-mingw? target)
|
||||
mingw-w64
|
||||
glibc))
|
||||
libc))
|
||||
|
||||
(define (cross-newlib? target)
|
||||
(not (eq? (native-libc target) glibc)))
|
||||
(define* (cross-newlib? target
|
||||
#:optional
|
||||
(libc glibc))
|
||||
(not (eq? (native-libc target libc) libc)))
|
||||
|
||||
|
||||
;;; Concrete cross tool chains are instantiated like this:
|
||||
|
|
Loading…
Reference in New Issue