Skip to content

Commit 01b8316

Browse files
committed
build: build using glibc 2.28 (wip)
1 parent 5f21353 commit 01b8316

File tree

4 files changed

+24
-108
lines changed

4 files changed

+24
-108
lines changed

contrib/devtools/symbol-check.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -20,32 +20,26 @@
2020
# - libgcc version 8.3.0 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libgcc1)
2121
# - libc version 2.28 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libc6)
2222
#
23-
# Ubuntu 18.04 (Bionic) EOL: 2028. https://wiki.ubuntu.com/ReleaseTeam
23+
# Ubuntu 20.04 (Focal) EOL: 2030. https://wiki.ubuntu.com/ReleaseTeam
2424
#
25-
# - libgcc version 8.4.0 (https://packages.ubuntu.com/bionic/libgcc1)
26-
# - libc version 2.27 (https://packages.ubuntu.com/bionic/libc6)
25+
# - libgcc version 10.3.0 (https://packages.ubuntu.com/focal/libgcc1)
26+
# - libc version 2.31 (https://packages.ubuntu.com/focal/libc6)
2727
#
2828
# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
2929
#
3030
# - libgcc version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
3131
# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
3232
#
3333
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
34-
#
35-
# For 32-bit systems the minimum libc version is 2.28 to embrace new fcntl{64} symbols.
36-
# It is safer than handling them in the glibc_compat.cpp due to their variadic arguments
37-
# with possible different sizes.
38-
# See: https://stackoverflow.com/a/58472959
39-
#
4034

4135
MAX_VERSIONS = {
4236
'GCC': (4,8,0),
4337
'GLIBC': {
44-
lief.ELF.ARCH.x86_64: (2,27),
38+
lief.ELF.ARCH.x86_64: (2,28),
4539
lief.ELF.ARCH.ARM: (2,28),
46-
lief.ELF.ARCH.AARCH64:(2,27),
47-
lief.ELF.ARCH.PPC64: (2,27),
48-
lief.ELF.ARCH.RISCV: (2,27),
40+
lief.ELF.ARCH.AARCH64:(2,28),
41+
lief.ELF.ARCH.PPC64: (2,28),
42+
lief.ELF.ARCH.RISCV: (2,28),
4943
},
5044
'LIBATOMIC': (1,0),
5145
'V': (0,5,0), # xkb (bitcoin-qt only)

contrib/guix/manifest.scm

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ chain for " target " development."))
148148
#:key
149149
(base-gcc-for-libc base-gcc)
150150
(base-kernel-headers linux-libre-headers-4.9)
151-
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.27)))
151+
(base-libc (hardened-glibc (make-glibc-without-werror glibc-2.28)))
152152
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
153153
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
154154
desirable for building Dash Core release binaries."
@@ -528,22 +528,21 @@ inspecting signatures in Mach-O binaries.")
528528
"--enable-stack-protector" "all")
529529
"--enable-bind-now" "yes"))
530530

531-
(define-public glibc-2.27
531+
(define-public glibc-2.28
532532
(package
533533
(inherit glibc-2.31)
534-
(version "2.27")
534+
(version "2.28")
535535
(source (origin
536536
(method git-fetch)
537537
(uri (git-reference
538538
(url "https://sourceware.org/git/glibc.git")
539-
(commit "73886db6218e613bd6d4edf529f11e008a6c2fa6")))
540-
(file-name (git-file-name "glibc" "73886db6218e613bd6d4edf529f11e008a6c2fa6"))
539+
(commit "c9e58ae23402eb82877de90fd8a18519c086ed87")))
540+
(file-name (git-file-name "glibc" "c9e58ae23402eb82877de90fd8a18519c086ed87"))
541541
(sha256
542542
(base32
543-
"0azpb9cvnbv25zg8019rqz48h8i2257ngyjg566dlnp74ivrs9vq"))
543+
"0wm0if2n4z48kpn85va6yb4iac34crds2f55ddpz1hykx6jp1pb6"))
544544
(patches (search-our-patches "glibc-ldd-x86_64.patch"
545545
"glibc-versioned-locpath.patch"
546-
"glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"
547546
"glibc-2.27-fcommon.patch"
548547
"glibc-2.27-guix-prefix.patch"))))))
549548

contrib/guix/patches/glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch

Lines changed: 0 additions & 78 deletions
This file was deleted.

contrib/guix/patches/glibc-versioned-locpath.patch

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@ versions coexist on the system.
2222

2323
/* Use this when we come along an error. */
2424
#define ERROR_RETURN \
25-
@@ -48,7 +49,6 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
26-
__locale_t result_ptr;
25+
@@ -48,7 +49,6 @@ __newlocale (int category_mask, const char *locale, locale_t base)
26+
locale_t result_ptr;
2727
char *locale_path;
2828
size_t locale_path_len;
2929
- const char *locpath_var;
@@ -51,7 +51,7 @@ versions coexist on the system.
5151
/* Get the names for the locales we are interested in. We either
5252
allow a composite name or a single name. */
5353
diff --git a/locale/setlocale.c b/locale/setlocale.c
54-
index ead030d..0c0e314 100644
54+
index e4de907e1f..47b6233fc5 100644
5555
--- a/locale/setlocale.c
5656
+++ b/locale/setlocale.c
5757
@@ -215,12 +215,65 @@ setdata (int category, struct __locale_data *data)
@@ -121,7 +121,7 @@ index ead030d..0c0e314 100644
121121
char *composite;
122122

123123
/* Sanity check for CATEGORY argument. */
124-
@@ -251,17 +304,10 @@ setlocale (int category, const char *locale)
124+
@@ -251,18 +304,11 @@ setlocale (int category, const char *locale)
125125
locale_path = NULL;
126126
locale_path_len = 0;
127127

@@ -142,22 +142,23 @@ index ead030d..0c0e314 100644
142142
}
143143

144144
if (category == LC_ALL)
145+
{
145146
diff --git a/string/Makefile b/string/Makefile
146-
index 8424a61..f925503 100644
147+
index aa2da9ca72..de752a1539 100644
147148
--- a/string/Makefile
148149
+++ b/string/Makefile
149-
@@ -38,7 +38,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
150+
@@ -40,7 +40,7 @@ routines := strcat strchr strcmp strcoll strcpy strcspn \
150151
swab strfry memfrob memmem rawmemchr strchrnul \
151152
$(addprefix argz-,append count create ctsep next \
152153
delete extract insert stringify \
153154
- addsep replace) \
154155
+ addsep replace suffix) \
155156
envz basename \
156157
strcoll_l strxfrm_l string-inlines memrchr \
157-
xpg-strerror strerror_l
158+
xpg-strerror strerror_l explicit_bzero
158159
diff --git a/string/argz-suffix.c b/string/argz-suffix.c
159160
new file mode 100644
160-
index 0000000..505b0f2
161+
index 0000000000..505b0f248c
161162
--- /dev/null
162163
+++ b/string/argz-suffix.c
163164
@@ -0,0 +1,56 @@
@@ -218,10 +219,10 @@ index 0000000..505b0f2
218219
+}
219220
+weak_alias (__argz_suffix_entries, argz_suffix_entries)
220221
diff --git a/string/argz.h b/string/argz.h
221-
index bb62a31..d276a35 100644
222+
index 9c496f5ef5..1010a439d8 100644
222223
--- a/string/argz.h
223224
+++ b/string/argz.h
224-
@@ -134,6 +134,16 @@ extern error_t argz_replace (char **__restrict __argz,
225+
@@ -108,6 +108,16 @@ extern error_t argz_replace (char **__restrict __argz,
225226
const char *__restrict __str,
226227
const char *__restrict __with,
227228
unsigned int *__restrict __replace_count);

0 commit comments

Comments
 (0)