[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc
From: |
Ludovic Courtès |
Subject: |
[bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the Hurd. |
Date: |
Thu, 15 Aug 2024 18:58:30 +0200 |
Previously the second ‘copy-recursively’ call would fail with EEXIST
since glibc@2.39 already provides $includedir/include/mach.
* guix/build/make-bootstrap.scm (make-stripped-libc)[copy-mach-headers]:
Pass #:select? to ‘copy-recursively’ to exclude files already present
under INCDIR.
Change-Id: I7e5a93e46eefa18299c231468c720072468fdb10
---
guix/build/make-bootstrap.scm | 26 ++++++++++++++++++++------
1 file changed, 20 insertions(+), 6 deletions(-)
diff --git a/guix/build/make-bootstrap.scm b/guix/build/make-bootstrap.scm
index 0d29338ce3..6cb5262f8e 100644
--- a/guix/build/make-bootstrap.scm
+++ b/guix/build/make-bootstrap.scm
@@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015, 2017 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
-;;; Copyright © 2015, 2019 Ludovic Courtès <ludo@gnu.org>
+;;; Copyright © 2015, 2019, 2024 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen <janneke@gnu.org>
;;;
;;; This file is part of GNU Guix.
@@ -84,13 +84,27 @@ (define (make-stripped-libc output libc kernel-headers)
when producing a bootstrap libc."
(define (copy-mach-headers output kernel-headers)
- (let* ((incdir (string-append output "/include")))
+ (let ((mach-headers (readlink
+ (string-append kernel-headers "/include/mach")))
+ (incdir (string-append output "/include")))
(copy-recursively (string-append libc "/include") incdir)
- (copy-recursively (string-append kernel-headers "/include/mach")
- (string-append incdir "/mach"))
- #t))
-
+ ;; As of glibc 2.39, essential Mach headers get installed by glibc
+ ;; itself in its own includedir, except for most of mach/machine/*.h.
+ ;; Copy anything that's missing from MACH-HEADERS.
+ (copy-recursively mach-headers
+ (string-append incdir "/mach")
+ #:select?
+ (let ((prefix (string-length mach-headers))
+ (target (string-append incdir "/mach")))
+ (lambda (file stat)
+ ;; Select everything but files and symlinks that
+ ;; already exist under TARGET.
+ (or (eq? 'directory (stat:type stat))
+ (let ((suffix (string-drop file prefix)))
+ (not (file-exists?
+ (in-vicinity target suffix))))))))))
+
(define (copy-libc+linux-headers output kernel-headers)
(let* ((incdir (string-append output "/include")))
(copy-recursively (string-append libc "/include") incdir)
--
2.45.2
- [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support, Ludovic Courtès, 2024/08/15
- [bug#72643] [PATCH core-updates 6/6] gnu: commencement: Build ‘perl-boot0’ without stack protector on the Hurd., Ludovic Courtès, 2024/08/15
- [bug#72643] [PATCH core-updates 4/6] DRAFT gnu: glibc-bootstrap: Update i586-gnu variant., Ludovic Courtès, 2024/08/15
- [bug#72643] [PATCH core-updates 1/6] gnu: make-bootstrap: Fix cross-compilation of ‘%glibc-stripped’., Ludovic Courtès, 2024/08/15
- [bug#72643] [PATCH core-updates 3/6] gnu: make-bootstrap: Include libdl.a and libutil.a in ‘glibc-stripped’., Ludovic Courtès, 2024/08/15
- [bug#72643] [PATCH core-updates 5/6] gnu: perl-boot0: Use gexps., Ludovic Courtès, 2024/08/15
- [bug#72643] [PATCH core-updates 2/6] gnu: make-bootstrap: Adjust ‘%glibc-stripped’ for glibc@2.39 on the Hurd.,
Ludovic Courtès <=
- [bug#72643] [PATCH core-updates 0/6] Restore i586-gnu (GNU/Hurd) support, Janneke Nieuwenhuizen, 2024/08/16