mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: cross-libc: Return #f if no libc available.
* gnu/packages/cross-base.scm (cross-libc): Return #f if no libc is available for the given TARGET. Change-Id: I17d19716373dd5704bb70d805437738fd29bd96b Signed-off-by: Efraim Flashner <efraim@flashner.co.il>
This commit is contained in:
parent
8e61e63515
commit
444a40c75a
1 changed files with 68 additions and 63 deletions
|
@ -9,6 +9,7 @@
|
||||||
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
;;; Copyright © 2020 Mathieu Othacehe <m.othacehe@gmail.com>
|
||||||
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
;;; Copyright © 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
|
||||||
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
|
;;; Copyright © 2023 Josselin Poiret <dev@jpoiret.xyz>
|
||||||
|
;;; Copyright © 2023 Foundation Devices, Inc. <hello@foundationdevices.com>
|
||||||
;;;
|
;;;
|
||||||
;;; This file is part of GNU Guix.
|
;;; This file is part of GNU Guix.
|
||||||
;;;
|
;;;
|
||||||
|
@ -610,18 +611,21 @@ the base compiler. Use XBINUTILS as the associated cross-Binutils."
|
||||||
(xbinutils (cross-binutils target))
|
(xbinutils (cross-binutils target))
|
||||||
(xheaders (cross-kernel-headers target)))
|
(xheaders (cross-kernel-headers target)))
|
||||||
"Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS
|
"Return LIBC cross-built for TARGET, a GNU triplet. Use XGCC and XBINUTILS
|
||||||
and the cross tool chain."
|
and the cross tool chain. If TARGET doesn't have a standard C library #f is
|
||||||
(if (target-mingw? target)
|
returned."
|
||||||
|
(match target
|
||||||
|
((? target-mingw?)
|
||||||
(let ((machine (substring target 0 (string-index target #\-))))
|
(let ((machine (substring target 0 (string-index target #\-))))
|
||||||
(make-mingw-w64 machine
|
(make-mingw-w64 machine
|
||||||
#:xgcc xgcc
|
#:xgcc xgcc
|
||||||
#:xbinutils xbinutils))
|
#:xbinutils xbinutils)))
|
||||||
|
((or (? target-linux?) (? target-hurd?))
|
||||||
(package
|
(package
|
||||||
(inherit libc)
|
(inherit libc)
|
||||||
(name (string-append "glibc-cross-" target))
|
(name (string-append "glibc-cross-" target))
|
||||||
(arguments
|
(arguments
|
||||||
(substitute-keyword-arguments
|
(substitute-keyword-arguments
|
||||||
`( ;; Disable stripping (see above.)
|
`(;; Disable stripping (see above.)
|
||||||
#:strip-binaries? #f
|
#:strip-binaries? #f
|
||||||
|
|
||||||
;; This package is used as a target input, but it should not have
|
;; This package is used as a target input, but it should not have
|
||||||
|
@ -677,7 +681,8 @@ and the cross tool chain."
|
||||||
#:xbinutils xbinutils)))
|
#:xbinutils xbinutils)))
|
||||||
'())
|
'())
|
||||||
,@(package-inputs libc) ;FIXME: static-bash
|
,@(package-inputs libc) ;FIXME: static-bash
|
||||||
,@(package-native-inputs libc))))))
|
,@(package-native-inputs libc)))))
|
||||||
|
(else #f)))
|
||||||
|
|
||||||
|
|
||||||
;;; Concrete cross tool chains are instantiated like this:
|
;;; Concrete cross tool chains are instantiated like this:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue