guix: bump minimum glibc to 2.31
Some checks are pending
ci/gh-actions/build / build-ubuntu-without-scanner (push) Waiting to run
ci/gh-actions/guix / cache-sources (push) Waiting to run
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:aarch64-linux-gnu]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:arm-linux-gnueabihf]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:arm64-apple-darwin]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:i686-linux-gnu]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:riscv64-linux-gnu]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:x86_64-apple-darwin]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:x86_64-linux-gnu.no-tor-bundle]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:x86_64-linux-gnu.pack]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:x86_64-linux-gnu]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:x86_64-w64-mingw32.installer]) (push) Blocked by required conditions
ci/gh-actions/guix / ${{ matrix.toolchain.target }} (map[target:x86_64-w64-mingw32]) (push) Blocked by required conditions
ci/gh-actions/guix / bundle-logs (push) Blocked by required conditions

This commit is contained in:
tobtoht 2024-08-08 08:44:37 +02:00
parent c0a5a549f4
commit f59ba3f3c9
No known key found for this signature in database
GPG key ID: E45B10DD027D2472
6 changed files with 11 additions and 173 deletions

View file

@ -104,7 +104,7 @@ chain for " target " development."))
#:key #:key
(base-gcc-for-libc linux-base-gcc) (base-gcc-for-libc linux-base-gcc)
(base-kernel-headers base-linux-kernel-headers) (base-kernel-headers base-linux-kernel-headers)
(base-libc glibc-2.27) (base-libc glibc-2.31)
(base-gcc linux-base-gcc)) (base-gcc linux-base-gcc))
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values "Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
desirable for building Feather Wallet release binaries." desirable for building Feather Wallet release binaries."
@ -181,22 +181,21 @@ chain for " target " development."))
(("-rpath=") "-rpath-link=")) (("-rpath=") "-rpath-link="))
#t)))))))) #t))))))))
(define-public glibc-2.27 (define-public glibc-2.31
(let ((commit "8e30f03744837a85e33d84ccd34ed3abe30d37c3"))
(package (package
(inherit glibc-2.31) (inherit glibc) ;; 2.35
(version "2.27") (version "2.31")
(source (origin (source (origin
(method git-fetch) (method git-fetch)
(uri (git-reference (uri (git-reference
(url "https://sourceware.org/git/glibc.git") (url "https://sourceware.org/git/glibc.git")
(commit "73886db6218e613bd6d4edf529f11e008a6c2fa6"))) (commit commit)))
(file-name (git-file-name "glibc" "73886db6218e613bd6d4edf529f11e008a6c2fa6")) (file-name (git-file-name "glibc" commit))
(sha256 (sha256
(base32 (base32
"0azpb9cvnbv25zg8019rqz48h8i2257ngyjg566dlnp74ivrs9vq")) "1zi0s9yy5zkisw823vivn7zlj8w6g9p3mm7lmlqiixcxdkz4dbn6"))
(patches (search-our-patches "glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch" (patches (search-our-patches "glibc-guix-prefix.patch"))))
"glibc-2.27-fcommon.patch"
"glibc-2.27-no-librt.patch"))))
(arguments (arguments
(substitute-keyword-arguments (package-arguments glibc) (substitute-keyword-arguments (package-arguments glibc)
((#:configure-flags flags) ((#:configure-flags flags)
@ -212,12 +211,13 @@ chain for " target " development."))
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Install the rpc data base file under `$out/etc/rpc'. ;; Install the rpc data base file under `$out/etc/rpc'.
;; Otherwise build will fail with "Permission denied." ;; Otherwise build will fail with "Permission denied."
;; Can be removed when we are building 2.32 or later.
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* "sunrpc/Makefile" (substitute* "sunrpc/Makefile"
(("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix) (("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
(string-append out "/etc/rpc" suffix "\n")) (string-append out "/etc/rpc" suffix "\n"))
(("^install-others =.*$") (("^install-others =.*$")
(string-append "install-others = " out "/etc/rpc\n")))))))))))) (string-append "install-others = " out "/etc/rpc\n")))))))))))))
(define-public ldid (define-public ldid
(package (package

View file

@ -1,32 +0,0 @@
commit 264a4a0dbe1f4369db315080034b500bed66016c
Author: fanquake <fanquake@gmail.com>
Date: Fri May 6 11:03:04 2022 +0100
build: use -fcommon to retain legacy behaviour with GCC 10
GCC 10 started using -fno-common by default, which causes issues with
the powerpc builds using gibc 2.24. A patch was commited to glibc to fix
the issue, 18363b4f010da9ba459b13310b113ac0647c2fcc but is non-trvial
to backport, and was broken in at least one way, see the followup in
commit 7650321ce037302bfc2f026aa19e0213b8d02fe6.
For now, retain the legacy GCC behaviour by passing -fcommon when
building glibc.
https://gcc.gnu.org/onlinedocs/gcc/Code-Gen-Options.html.
https://sourceware.org/git/?p=glibc.git;a=commit;h=18363b4f010da9ba459b13310b113ac0647c2fcc
https://sourceware.org/git/?p=glibc.git;a=commit;h=7650321ce037302bfc2f026aa19e0213b8d02fe6
diff --git a/Makeconfig b/Makeconfig
index 86a71e5802..aa2166be60 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -896,7 +896,7 @@ ifeq "$(strip $(+cflags))" ""
endif # $(+cflags) == ""
+cflags += $(cflags-cpu) $(+gccwarn) $(+merge-constants) $(+math-flags) \
- $(+stack-protector)
+ $(+stack-protector) -fcommon
+gcc-nowarn := -w
# Don't duplicate options if we inherited variables from the parent.

View file

@ -1,53 +0,0 @@
This patch can be dropped when we are building with glibc 2.30+.
commit 6e41ef56c9baab719a02f1377b1e7ce7bff61e73
Author: Florian Weimer <fweimer@redhat.com>
Date: Fri Feb 8 10:21:56 2019 +0100
rt: Turn forwards from librt to libc into compat symbols [BZ #24194]
As the result of commit 6e6249d0b461b952d0f544792372663feb6d792a
("BZ#14743: Move clock_* symbols from librt to libc."), in glibc 2.17,
clock_gettime, clock_getres, clock_settime, clock_getcpuclockid,
clock_nanosleep were added to libc, and the file rt/clock-compat.c
was added with forwarders to the actual implementations in libc.
These forwarders were wrapped in
#if SHLIB_COMPAT (librt, GLIBC_2_2, GLIBC_2_17)
so that they are not present for newer architectures (such as
powerpc64le) with a 2.17 or later ABI baseline. But the forwarders
were not marked as compatibility symbols. As a result, on older
architectures, historic configure checks such as
AC_CHECK_LIB(rt, clock_gettime)
still cause linking against librt, even though this is completely
unnecessary. It also creates a needless porting hazard because
architectures behave differently when it comes to symbol availability.
Reviewed-by: Carlos O'Donell <carlos@redhat.com>
diff --git a/rt/clock-compat.c b/rt/clock-compat.c
index f816973c05..11e71aa890 100644
--- a/rt/clock-compat.c
+++ b/rt/clock-compat.c
@@ -30,14 +30,16 @@
#if HAVE_IFUNC
# undef INIT_ARCH
# define INIT_ARCH()
-# define COMPAT_REDIRECT(name, proto, arglist) libc_ifunc (name, &__##name)
+# define COMPAT_REDIRECT(name, proto, arglist) libc_ifunc (name, &__##name) \
+ compat_symbol (librt, name, name, GLIBC_2_2);
#else
# define COMPAT_REDIRECT(name, proto, arglist) \
int \
name proto \
{ \
return __##name arglist; \
- }
+ } \
+ compat_symbol (librt, name, name, GLIBC_2_2);
#endif
COMPAT_REDIRECT (clock_getres,

View file

@ -1,76 +0,0 @@
Note that this has been modified from the original commit, to use __has_include
instead of __has_include__, as the later was causing build failures with GCC 10.
See also: http://lists.busybox.net/pipermail/buildroot/2020-July/590376.html.
https://sourceware.org/git/?p=glibc.git;a=commit;h=0b9c84906f653978fb8768c7ebd0ee14a47e662e
From 562c52cc81a4e456a62e6455feb32732049e9070 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Mon, 31 Dec 2018 09:26:42 -0800
Subject: [PATCH] riscv: Use __has_include__ to include <asm/syscalls.h> [BZ
#24022]
<asm/syscalls.h> has been removed by
commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25
Author: David Abdurachmanov <david.abdurachmanov@gmail.com>
Date: Thu Nov 8 20:02:39 2018 +0100
riscv: add asm/unistd.h UAPI header
Marcin Juszkiewicz reported issues while generating syscall table for riscv
using 4.20-rc1. The patch refactors our unistd.h files to match some other
architectures.
- Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit
- Remove asm/syscalls.h UAPI header and merge to asm/unistd.h
- Adjust kernel asm/unistd.h
So now asm/unistd.h UAPI header should show all syscalls for riscv.
<asm/syscalls.h> may be restored by
Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header
Date: Tue, 11 Dec 2018 09:09:35 +0100
UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header,
which did resolve issue with missing syscalls macros resulting in
glibc (2.28) build failure. It also broke glibc in a different way:
asm/syscalls.h is being used by glibc. I noticed this while doing
Fedora 30/Rawhide mass rebuild.
The patch returns asm/syscalls.h header and incl. it into asm/unistd.h.
I plan to send a patch to glibc to use asm/unistd.h instead of
asm/syscalls.h
In the meantime, we use __has_include__, which was added to GCC 5, to
check if <asm/syscalls.h> exists before including it. Tested with
build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7.
[BZ #24022]
* sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if
<asm/syscalls.h> exists with __has_include__ before including it.
---
sysdeps/unix/sysv/linux/riscv/flush-icache.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
index d612ef4c6c..0b2042620b 100644
--- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c
+++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c
@@ -21,7 +21,11 @@
#include <stdlib.h>
#include <atomic.h>
#include <sys/cachectl.h>
-#include <asm/syscalls.h>
+#if __has_include (<asm/syscalls.h>)
+# include <asm/syscalls.h>
+#else
+# include <asm/unistd.h>
+#endif
typedef int (*func_type) (void *, void *, unsigned long int);
--
2.31.1

View file

@ -76,7 +76,6 @@ sethsimmons
Shakybeats Shakybeats
SmashTR SmashTR
SovereignStreetArt SovereignStreetArt
spoontechtips
stickyf00t stickyf00t
strace strace
tevador tevador