mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-12-24 05:18:07 -05:00
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
1 changed files with 14 additions and 9 deletions
|
@ -422,14 +422,15 @@ (define xhurd-core-headers
|
||||||
|
|
||||||
(define* (cross-libc target
|
(define* (cross-libc target
|
||||||
#:optional
|
#:optional
|
||||||
|
(libc glibc)
|
||||||
(xgcc (cross-gcc target))
|
(xgcc (cross-gcc target))
|
||||||
(xbinutils (cross-binutils target))
|
(xbinutils (cross-binutils target))
|
||||||
(xheaders (cross-kernel-headers target)))
|
(xheaders (cross-kernel-headers target)))
|
||||||
"Return a libc cross-built for TARGET, a GNU triplet. Use XGCC and
|
"Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS
|
||||||
XBINUTILS and the cross tool chain."
|
and the cross tool chain."
|
||||||
(if (cross-newlib? target)
|
(if (cross-newlib? target libc)
|
||||||
(native-libc target)
|
(native-libc target libc)
|
||||||
(let ((libc glibc))
|
(let ((libc libc))
|
||||||
(package (inherit libc)
|
(package (inherit libc)
|
||||||
(name (string-append "glibc-cross-" target))
|
(name (string-append "glibc-cross-" target))
|
||||||
(arguments
|
(arguments
|
||||||
|
@ -502,13 +503,17 @@ (define* (cross-libc target
|
||||||
,@(package-inputs libc) ;FIXME: static-bash
|
,@(package-inputs libc) ;FIXME: static-bash
|
||||||
,@(package-native-inputs libc)))))))
|
,@(package-native-inputs libc)))))))
|
||||||
|
|
||||||
(define (native-libc target)
|
(define* (native-libc target
|
||||||
|
#:optional
|
||||||
|
(libc glibc))
|
||||||
(if (target-mingw? target)
|
(if (target-mingw? target)
|
||||||
mingw-w64
|
mingw-w64
|
||||||
glibc))
|
libc))
|
||||||
|
|
||||||
(define (cross-newlib? target)
|
(define* (cross-newlib? target
|
||||||
(not (eq? (native-libc target) glibc)))
|
#:optional
|
||||||
|
(libc glibc))
|
||||||
|
(not (eq? (native-libc target libc) libc)))
|
||||||
|
|
||||||
|
|
||||||
;;; Concrete cross tool chains are instantiated like this:
|
;;; Concrete cross tool chains are instantiated like this:
|
||||||
|
|
Loading…
Reference in a new issue