aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
authorJosselin Poiret <dev@jpoiret.xyz>2023-05-22 11:42:26 +0200
committerJosselin Poiret <dev@jpoiret.xyz>2023-07-13 18:20:05 +0200
commit0dd293b4d9095137c9952e16ca951f887b7e7018 (patch)
treea2d45219218d10a0296bd8c9cba63ab01fb2aae0 /gnu/packages/base.scm
parent0613df90ddadce62b2c6e22048b216602bd9a230 (diff)
downloadguix-0dd293b4d9095137c9952e16ca951f887b7e7018.tar
guix-0dd293b4d9095137c9952e16ca951f887b7e7018.tar.gz
gnu: Add libc-for-target and glibc/hurd.
* gnu/packages/patches/glibc-2.37-hurd-clock_t_centiseconds.patch * gnu/packages/patches/glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch * gnu/packages/patches/glibc-2.37-versioned-locpath.patch: New patches. * gnu/local.mk (dist_patch_DATA): Register them. * gnu/packages/base.scm (glibc/hurd, libc-for-target): New variables. (glibc/hurd-headers): Use glibc/hurd. * gnu/packages/commencement.scm (glibc-final-with-bootstrap-bash)[outputs, source, arguments] (glibc-final)[source]: Use libc-for-target instead of glibc. * gnu/packages/cross-base.scm (cross-libc/deprecated, cross-libc*): Use libc-for-target. This part fixes https://issues.guix.gnu.org/63641#25 * gnu/packages/commencement.scm (%final-inputs): Change to memoized lambda taking "system". * gnu/packages/commencement.scm (canonical-package): Likewise, and update user, passing (%current-system). (make-gcc-toolchain): Update user, passing (%current-system). * gnu/packages/base.scm (%final-inputs): Likewise. * guix/scripts/refresh.scm (options->update-specs): Likewise. * guix/build-system/gnu.scm (standard-packages): Add optional "system" parameter. (lower): Update caller. Co-authored-by: Ludovic Courtès <ludo@gnu.org> Co-authored-by: Janneke Nieuwenhuizen <janneke@gnu.org>
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm39
1 files changed, 35 insertions, 4 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 38593e4ada..55fe70309c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -76,6 +76,7 @@
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:export (glibc
+ libc-for-target
make-ld-wrapper
libiconv-if-needed))
@@ -1420,20 +1421,41 @@ variety of options. It is an alternative to the shell \"type\" built-in
command.")
(license gpl3+))) ; some files are under GPLv2+
+(define-public glibc/hurd
+ (package/inherit glibc
+ (name "glibc-hurd")
+ (version "2.37")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0hqsp4dzrjx0iga6jv0magjw26dh82pxlmk8yis5v0d127qyymr2"))
+ (patches (search-patches "glibc-ldd-powerpc.patch"
+ "glibc-dl-cache.patch"
+ "glibc-2.37-versioned-locpath.patch"
+ "glibc-reinstate-prlimit64-fallback.patch"
+ "glibc-supported-locales.patch"
+ "glibc-2.37-hurd-clock_t_centiseconds.patch"
+ "glibc-2.37-hurd-local-clock_gettime_MONOTONIC.patch"
+ "glibc-hurd-mach-print.patch"
+ "glibc-hurd-gettyent.patch"))))
+ (supported-systems %hurd-systems)))
+
(define-public glibc/hurd-headers
- (package (inherit glibc)
+ (package/inherit glibc/hurd
(name "glibc-hurd-headers")
(outputs '("out"))
(propagated-inputs (list gnumach-headers hurd-headers))
(native-inputs
- (modify-inputs (package-native-inputs glibc)
+ (modify-inputs (package-native-inputs glibc/hurd)
(prepend (if (%current-target-system)
(let* ((cross-base (resolve-interface '(gnu packages cross-base)))
(cross-mig (module-ref cross-base 'cross-mig)))
(cross-mig (%current-target-system)))
mig))))
(arguments
- (substitute-keyword-arguments (package-arguments glibc)
+ (substitute-keyword-arguments (package-arguments glibc/hurd)
;; We just pass the flags really needed to build the headers.
((#:configure-flags flags)
`(list "--enable-add-ons"
@@ -1454,6 +1476,15 @@ command.")
(delete 'build))))) ; nothing to build
(supported-systems %hurd-systems)))
+(define* (libc-for-target #:optional
+ (target (or (%current-target-system)
+ (%current-system))))
+ (match target
+ ((? target-hurd?)
+ glibc/hurd)
+ (_
+ glibc)))
+
(define-public tzdata
(package
(name "tzdata")
@@ -1602,6 +1633,6 @@ package needs iconv ,@(libiconv-if-needed) should be added."
"Return the list of \"final inputs\"."
;; Avoid circular dependency by lazily resolving 'commencement'.
(let ((iface (resolve-interface '(gnu packages commencement))))
- (module-ref iface '%final-inputs)))
+ ((module-ref iface '%final-inputs) (%current-system))))
;;; base.scm ends here