From: Marius Bakke <marius@gnu.org>
To: 57533@debbugs.gnu.org
Cc: zamfofex <zamfofex@twdb.moe>
Subject: [bug#57533] [PATCH core-updates 1/5] gnu: glibc: Update to 2.35.
Date: Fri, 2 Sep 2022 00:29:53 +0200 [thread overview]
Message-ID: <20220901222957.15383-1-marius@gnu.org> (raw)
In-Reply-To: <20220901222413.14482-1-marius@gnu.org>
From: zamfofex <zamfofex@twdb.moe>
* gnu/packages/base.scm (glibc): Update to 2.35.
[arguments]: Handle empty library files.
* gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch: Adjust for
renamed file.
Signed-off-by: Marius Bakke <marius@gnu.org>
---
gnu/packages/base.scm | 34 +++++++++++++++++--
.../glibc-hurd-clock_gettime_monotonic.patch | 4 +--
2 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index cf640aad25..157cba5ff4 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -20,6 +20,7 @@
;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be>
;;; Copyright © 2021 Guillaume Le Vaillant <glv@posteo.net>
;;; Copyright © 2021 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 zamfofex <zamfofex@twdb.moe>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -709,13 +710,13 @@ (define-public glibc
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- (version "2.33")
+ (version "2.35")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
- "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f"))
+ "0bpm1kfi09dxl4c6aanc5c9951fmf6ckkzay60cx7k37dcpp68si"))
(patches (search-patches "glibc-ldd-powerpc.patch"
"glibc-ldd-x86_64.patch"
"glibc-dl-cache.patch"
@@ -753,6 +754,7 @@ (define-public glibc
#:validate-runpath? #f
#:modules ((ice-9 ftw)
+ (srfi srfi-1)
(srfi srfi-26)
(guix build utils)
(guix build gnu-build-system))
@@ -867,13 +869,34 @@ (define-public glibc
(add-after 'install 'move-static-libs
(lambda* (#:key outputs #:allow-other-keys)
;; Move static libraries to the "static" output.
+ ;; Note: As of GNU libc 2.34, the contents of some ".a"
+ ;; files have been moved into "libc.so", and *both* empty
+ ;; ".so" and ".a" files have been introduced to avoid
+ ;; breaking existing executables and existing builds
+ ;; respectively. The intent of the seemingly redundant
+ ;; empty ".a" files is to avoid newly-compiled executables
+ ;; from having dependencies on the empty shared libraries,
+ ;; and as such, it is useful to have these ".a" files in
+ ;; OUT in addition to STATIC.
+
+ ;; XXX: It might be better to determine whether a static
+ ;; library is empty by some criterion (such as their file
+ ;; size equaling eight bytes) rather than hardcoding them
+ ;; by name.
+ (define empty-static-libraries
+ '("libpthread.a" "libdl.a" "libutil.a" "libanl.a"))
+ (define (empty-static-library? file)
+ (any (lambda (s)
+ (string=? file s)) empty-static-libraries))
+
(define (static-library? file)
;; Return true if FILE is a static library. The
;; "_nonshared.a" files are referred to by libc.so,
;; libpthread.so, etc., which are in fact linker
;; scripts.
(and (string-suffix? ".a" file)
- (not (string-contains file "_nonshared"))))
+ (not (string-contains file "_nonshared"))
+ (not (empty-static-library? file))))
(define (linker-script? file)
;; Guess whether FILE, a ".a" file, is actually a
@@ -884,6 +907,7 @@ (define (linker-script? file)
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(files (scandir lib static-library?))
+ (empty (scandir lib empty-static-library?))
(static (assoc-ref outputs "static"))
(slib (string-append static "/lib")))
(mkdir-p slib)
@@ -891,6 +915,10 @@ (define (linker-script? file)
(rename-file (string-append lib "/" base)
(string-append slib "/" base)))
files)
+ (for-each (lambda (base)
+ (copy-file (string-append lib "/" base)
+ (string-append slib "/" base)))
+ empty)
;; Usually libm.a is a linker script so we need to
;; change the file names in there to refer to STATIC
diff --git a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
index e31f99a1ce..b02215550d 100644
--- a/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
+++ b/gnu/packages/patches/glibc-hurd-clock_gettime_monotonic.patch
@@ -67,8 +67,8 @@ index fcd79fd554..1dd02aa449 100644
diff --git a/sysdeps/pthread/timer_create.c b/sysdeps/pthread/timer_create.c
index 9d8a9ea8ae..3430582c09 100644
---- a/sysdeps/pthread/timer_create.c
-+++ b/sysdeps/pthread/timer_create.c
+--- a/rt/timer_create.c
++++ b/rt/timer_create.c
@@ -48,7 +48,7 @@ timer_create (clockid_t clock_id, struct sigevent *evp, timer_t *timerid)
return -1;
}
--
2.37.2
next prev parent reply other threads:[~2022-09-01 22:31 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-01 22:24 [bug#57533] [PATCH core-updates 0/5] glibc 2.35 and GCC 11 Marius Bakke
2022-09-01 22:29 ` Marius Bakke [this message]
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 2/5] syscalls: Adjust for glibc 2.34 and later Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 3/5] gnu: Switch to GCC 11 Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 4/5] gnu: glm: Fix build with " Marius Bakke
2022-09-01 22:29 ` [bug#57533] [PATCH core-updates 5/5] gnu: clang-runtime: Remove obsolete workaround Marius Bakke
2022-09-08 19:48 ` bug#57533: [PATCH core-updates 0/5] glibc 2.35 and GCC 11 Marius Bakke
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220901222957.15383-1-marius@gnu.org \
--to=marius@gnu.org \
--cc=57533@debbugs.gnu.org \
--cc=zamfofex@twdb.moe \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).