mirror of
https://github.com/dashpay/dash.git
synced 2024-12-24 19:42:46 +01:00
build: use glibc 2.28 for all Linux builds
This commit is contained in:
parent
5cb5a6edb0
commit
a7cb99b184
@ -20,10 +20,10 @@ import lief
|
||||
# - libgcc version 8.3.0 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libgcc1)
|
||||
# - libc version 2.28 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libc6)
|
||||
#
|
||||
# Ubuntu 18.04 (Bionic) EOL: 2028. https://wiki.ubuntu.com/ReleaseTeam
|
||||
# Ubuntu 20.04 (Focal) EOL: 2030. https://wiki.ubuntu.com/ReleaseTeam
|
||||
#
|
||||
# - libgcc version 8.4.0 (https://packages.ubuntu.com/bionic/libgcc1)
|
||||
# - libc version 2.27 (https://packages.ubuntu.com/bionic/libc6)
|
||||
# - libgcc version 10.3.0 (https://packages.ubuntu.com/focal/libgcc1)
|
||||
# - libc version 2.31 (https://packages.ubuntu.com/focal/libc6)
|
||||
#
|
||||
# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
|
||||
#
|
||||
@ -31,21 +31,15 @@ import lief
|
||||
# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
|
||||
#
|
||||
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
|
||||
#
|
||||
# For 32-bit systems the minimum libc version is 2.28 to embrace new fcntl{64} symbols.
|
||||
# It is safer than handling them in the glibc_compat.cpp due to their variadic arguments
|
||||
# with possible different sizes.
|
||||
# See: https://stackoverflow.com/a/58472959
|
||||
#
|
||||
|
||||
MAX_VERSIONS = {
|
||||
'GCC': (4,8,0),
|
||||
'GLIBC': {
|
||||
lief.ELF.ARCH.x86_64: (2,27),
|
||||
lief.ELF.ARCH.x86_64: (2,28),
|
||||
lief.ELF.ARCH.ARM: (2,28),
|
||||
lief.ELF.ARCH.AARCH64:(2,27),
|
||||
lief.ELF.ARCH.PPC64: (2,27),
|
||||
lief.ELF.ARCH.RISCV: (2,27),
|
||||
lief.ELF.ARCH.AARCH64:(2,28),
|
||||
lief.ELF.ARCH.PPC64: (2,28),
|
||||
lief.ELF.ARCH.RISCV: (2,28),
|
||||
},
|
||||
'LIBATOMIC': (1,0),
|
||||
'V': (0,5,0), # xkb (bitcoin-qt only)
|
||||
|
@ -148,7 +148,7 @@ chain for " target " development."))
|
||||
#:key
|
||||
(base-gcc-for-libc base-gcc)
|
||||
(base-kernel-headers base-linux-kernel-headers)
|
||||
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.27)))
|
||||
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.28)))
|
||||
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
|
||||
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
|
||||
desirable for building Dash Core release binaries."
|
||||
@ -508,25 +508,24 @@ inspecting signatures in Mach-O binaries.")
|
||||
(define (hardened-glibc glibc)
|
||||
(package-with-extra-configure-variable (
|
||||
package-with-extra-configure-variable glibc
|
||||
"--enable-stack-protector" "all")
|
||||
"--enable-stack-protector" "strong")
|
||||
"--enable-bind-now" "yes"))
|
||||
|
||||
(define-public glibc-2.27
|
||||
(define-public glibc-2.28
|
||||
(package
|
||||
(inherit glibc-2.31)
|
||||
(version "2.27")
|
||||
(version "2.28")
|
||||
(source (origin
|
||||
(method git-fetch)
|
||||
(uri (git-reference
|
||||
(url "https://sourceware.org/git/glibc.git")
|
||||
(commit "73886db6218e613bd6d4edf529f11e008a6c2fa6")))
|
||||
(file-name (git-file-name "glibc" "73886db6218e613bd6d4edf529f11e008a6c2fa6"))
|
||||
(commit "c9e58ae23402eb82877de90fd8a18519c086ed87")))
|
||||
(file-name (git-file-name "glibc" "c9e58ae23402eb82877de90fd8a18519c086ed87"))
|
||||
(sha256
|
||||
(base32
|
||||
"0azpb9cvnbv25zg8019rqz48h8i2257ngyjg566dlnp74ivrs9vq"))
|
||||
"0wm0if2n4z48kpn85va6yb4iac34crds2f55ddpz1hykx6jp1pb6"))
|
||||
(patches (search-our-patches "glibc-ldd-x86_64.patch"
|
||||
"glibc-versioned-locpath.patch"
|
||||
"glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"
|
||||
"glibc-2.27-fcommon.patch"
|
||||
"glibc-2.27-guix-prefix.patch"))))))
|
||||
|
||||
|
@ -1,78 +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
|
||||
|
||||
This patch can be dropped when we are building with glibc 2.28+.
|
||||
|
||||
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
|
||||
|
@ -22,8 +22,8 @@ versions coexist on the system.
|
||||
|
||||
/* Use this when we come along an error. */
|
||||
#define ERROR_RETURN \
|
||||
@@ -48,7 +49,6 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
|
||||
__locale_t result_ptr;
|
||||
@@ -48,7 +49,6 @@ __newlocale (int category_mask, const char *locale, locale_t base)
|
||||
locale_t result_ptr;
|
||||
char *locale_path;
|
||||
size_t locale_path_len;
|
||||
- const char *locpath_var;
|
||||
@ -51,7 +51,7 @@ versions coexist on the system.
|
||||
/* Get the names for the locales we are interested in. We either
|
||||
allow a composite name or a single name. */
|
||||
diff --git a/locale/setlocale.c b/locale/setlocale.c
|
||||
index ead030d..0c0e314 100644
|
||||
index e4de907e1f..47b6233fc5 100644
|
||||
--- a/locale/setlocale.c
|
||||
+++ b/locale/setlocale.c
|
||||
@@ -215,12 +215,65 @@ setdata (int category, struct __locale_data *data)
|
||||
@ -121,7 +121,7 @@ index ead030d..0c0e314 100644
|
||||
char *composite;
|
||||
|
||||
/* Sanity check for CATEGORY argument. */
|
||||
@@ -251,17 +304,10 @@ setlocale (int category, const char *locale)
|
||||
@@ -251,18 +304,11 @@ setlocale (int category, const char *locale)
|
||||
locale_path = NULL;
|
||||
locale_path_len = 0;
|
||||
|
||||
@ -142,11 +142,12 @@ index ead030d..0c0e314 100644
|
||||
}
|
||||
|
||||
if (category == LC_ALL)
|
||||
{
|
||||
diff --git a/string/Makefile b/string/Makefile
|
||||
index 8424a61..f925503 100644
|
||||
index aa2da9ca72..de752a1539 100644
|
||||
--- a/string/Makefile
|
||||
+++ b/string/Makefile
|
||||
@@ -38,7 +38,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
|
||||
@@ -40,7 +40,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
|
||||
swab strfry memfrob memmem rawmemchr strchrnul \
|
||||
$(addprefix argz-,append count create ctsep next \
|
||||
delete extract insert stringify \
|
||||
@ -154,10 +155,10 @@ index 8424a61..f925503 100644
|
||||
+ addsep replace suffix) \
|
||||
envz basename \
|
||||
strcoll_l strxfrm_l string-inlines memrchr \
|
||||
xpg-strerror strerror_l
|
||||
xpg-strerror strerror_l explicit_bzero
|
||||
diff --git a/string/argz-suffix.c b/string/argz-suffix.c
|
||||
new file mode 100644
|
||||
index 0000000..505b0f2
|
||||
index 0000000000..505b0f248c
|
||||
--- /dev/null
|
||||
+++ b/string/argz-suffix.c
|
||||
@@ -0,0 +1,56 @@
|
||||
@ -218,10 +219,10 @@ index 0000000..505b0f2
|
||||
+}
|
||||
+weak_alias (__argz_suffix_entries, argz_suffix_entries)
|
||||
diff --git a/string/argz.h b/string/argz.h
|
||||
index bb62a31..d276a35 100644
|
||||
index 9c496f5ef5..1010a439d8 100644
|
||||
--- a/string/argz.h
|
||||
+++ b/string/argz.h
|
||||
@@ -134,6 +134,16 @@ extern error_t argz_replace (char **__restrict __argz,
|
||||
@@ -108,6 +108,16 @@ extern error_t argz_replace (char **__restrict __argz,
|
||||
const char *__restrict __str,
|
||||
const char *__restrict __with,
|
||||
unsigned int *__restrict __replace_count);
|
||||
|
@ -12,7 +12,7 @@ These are the dependencies currently used by Dash Core. You can find instruction
|
||||
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
|
||||
| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) (Android only) |
|
||||
| GCC | | [7+](https://gcc.gnu.org/) (C++17 support) | | | |
|
||||
| glibc | | [2.27](https://www.gnu.org/software/libc/) | | | | |
|
||||
| glibc | | [2.28](https://www.gnu.org/software/libc/) | | | | |
|
||||
| HarfBuzz-NG | | | | | [Yes](https://github.com/dashpay/dash/blob/develop/depends/packages/qt.mk) |
|
||||
| libevent | [2.1.12-stable](https://github.com/libevent/libevent/releases) | [2.0.21](https://github.com/bitcoin/bitcoin/pull/18676) | No | | |
|
||||
| libnatpmp | git commit [4536032...](https://github.com/miniupnp/libnatpmp/tree/4536032ae32268a45c073a4d5e91bbab4534773a) | | No | | |
|
||||
|
Loading…
Reference in New Issue
Block a user