Skip to content

Commit 74c9893

Browse files
committed
guix: use glibc 2.27 for all Linux builds
Also point to the latest commit on the glibc 2.27 releases branch. https://sourceware.org/git/?p=glibc.git;a=shortlog;h=refs/heads/release/2.27/master
1 parent 141115a commit 74c9893

11 files changed

+27
-353
lines changed

contrib/devtools/symbol-check.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,30 +15,30 @@
1515

1616
import lief #type:ignore
1717

18-
# Debian 9 (Stretch) EOL: 2022. https://wiki.debian.org/DebianReleases#Production_Releases
18+
# Debian 10 (Buster) EOL: 2024. https://wiki.debian.org/LTS
1919
#
20-
# - g++ version 6.3.0 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=g%2B%2B)
21-
# - libc version 2.24 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=libc6)
20+
# - libgcc version 8.3.0 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libgcc1)
21+
# - libc version 2.28 (https://packages.debian.org/search?suite=buster&arch=any&searchon=names&keywords=libc6)
2222
#
23-
# Ubuntu 16.04 (Xenial) EOL: 2026. https://wiki.ubuntu.com/Releases
23+
# Ubuntu 18.04 (Bionic) EOL: 2028. https://wiki.ubuntu.com/ReleaseTeam
2424
#
25-
# - g++ version 5.3.1
26-
# - libc version 2.23
25+
# - libgcc version 8.4.0 (https://packages.ubuntu.com/bionic/libgcc1)
26+
# - libc version 2.27 (https://packages.ubuntu.com/bionic/libc6)
2727
#
2828
# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
2929
#
30-
# - g++ version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
30+
# - 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.
3434

3535
MAX_VERSIONS = {
3636
'GCC': (4,8,0),
3737
'GLIBC': {
38-
lief.ELF.ARCH.x86_64: (2,18),
39-
lief.ELF.ARCH.ARM: (2,18),
40-
lief.ELF.ARCH.AARCH64:(2,18),
41-
lief.ELF.ARCH.PPC64: (2,18),
38+
lief.ELF.ARCH.x86_64: (2,27),
39+
lief.ELF.ARCH.ARM: (2,27),
40+
lief.ELF.ARCH.AARCH64:(2,27),
41+
lief.ELF.ARCH.PPC64: (2,27),
4242
lief.ELF.ARCH.RISCV: (2,27),
4343
},
4444
'LIBATOMIC': (1,0),

contrib/devtools/test-symbol-check.py

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -38,31 +38,6 @@ def test_ELF(self):
3838
executable = 'test1'
3939
cc = determine_wellknown_cmd('CC', 'gcc')
4040

41-
# there's no way to do this test for RISC-V at the moment; we build for
42-
# RISC-V in a glibc 2.27 environment and we allow all symbols from 2.27.
43-
if 'riscv' in get_machine(cc):
44-
self.skipTest("test not available for RISC-V")
45-
46-
# nextup was introduced in GLIBC 2.24, so is newer than our supported
47-
# glibc (2.18), and available in our release build environment (2.24).
48-
with open(source, 'w', encoding="utf8") as f:
49-
f.write('''
50-
#define _GNU_SOURCE
51-
#include <math.h>
52-
53-
double nextup(double x);
54-
55-
int main()
56-
{
57-
nextup(3.14);
58-
return 0;
59-
}
60-
''')
61-
62-
self.assertEqual(call_symbol_check(cc, source, executable, ['-lm']),
63-
(1, executable + ': symbol nextup from unsupported version GLIBC_2.24(3)\n' +
64-
executable + ': failed IMPORTED_SYMBOLS'))
65-
6641
# -lutil is part of the libc6 package so a safe bet that it's installed
6742
# it's also out of context enough that it's unlikely to ever become a real dependency
6843
source = 'test2.c'

contrib/guix/manifest.scm

Lines changed: 8 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ chain for " target " development."))
147147
#:key
148148
(base-gcc-for-libc base-gcc)
149149
(base-kernel-headers base-linux-kernel-headers)
150-
(base-libc (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.24)))
150+
(base-libc (make-glibc-with-stack-protector (make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27))))
151151
(base-gcc (make-gcc-rpath-link (hardened-gcc base-gcc))))
152152
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
153153
desirable for building Bitcoin Core release binaries."
@@ -543,42 +543,23 @@ inspecting signatures in Mach-O binaries.")
543543
(define (make-glibc-with-bind-now glibc)
544544
(package-with-extra-configure-variable glibc "--enable-bind-now" "yes"))
545545

546-
(define-public glibc-2.24
547-
(package
548-
(inherit glibc-2.31)
549-
(version "2.24")
550-
(source (origin
551-
(method git-fetch)
552-
(uri (git-reference
553-
(url "https://sourceware.org/git/glibc.git")
554-
(commit "0d7f1ed30969886c8dde62fbf7d2c79967d4bace")))
555-
(file-name (git-file-name "glibc" "0d7f1ed30969886c8dde62fbf7d2c79967d4bace"))
556-
(sha256
557-
(base32
558-
"0g5hryia5v1k0qx97qffgwzrz4lr4jw3s5kj04yllhswsxyjbic3"))
559-
(patches (search-our-patches "glibc-ldd-x86_64.patch"
560-
"glibc-versioned-locpath.patch"
561-
"glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch"
562-
"glibc-2.24-no-build-time-cxx-header-run.patch"
563-
"glibc-2.24-fcommon.patch"
564-
"glibc-2.24-guix-prefix.patch"))))))
565-
566-
(define-public glibc-2.27/bitcoin-patched
546+
(define-public glibc-2.27
567547
(package
568548
(inherit glibc-2.31)
569549
(version "2.27")
570550
(source (origin
571551
(method git-fetch)
572552
(uri (git-reference
573553
(url "https://sourceware.org/git/glibc.git")
574-
(commit "23158b08a0908f381459f273a984c6fd328363cb")))
575-
(file-name (git-file-name "glibc" "23158b08a0908f381459f273a984c6fd328363cb"))
554+
(commit "73886db6218e613bd6d4edf529f11e008a6c2fa6")))
555+
(file-name (git-file-name "glibc" "73886db6218e613bd6d4edf529f11e008a6c2fa6"))
576556
(sha256
577557
(base32
578-
"1b2n1gxv9f4fd5yy68qjbnarhf8mf4vmlxk10i3328c1w5pmp0ca"))
558+
"0azpb9cvnbv25zg8019rqz48h8i2257ngyjg566dlnp74ivrs9vq"))
579559
(patches (search-our-patches "glibc-ldd-x86_64.patch"
560+
"glibc-versioned-locpath.patch"
580561
"glibc-2.27-riscv64-Use-__has_include-to-include-asm-syscalls.h.patch"
581-
"glibc-2.27-dont-redefine-nss-database.patch"
562+
"glibc-2.27-fcommon.patch"
582563
"glibc-2.27-guix-prefix.patch"))))))
583564

584565
(packages->manifest
@@ -627,12 +608,7 @@ inspecting signatures in Mach-O binaries.")
627608
(make-nsis-for-gcc-10 nsis-x86_64)
628609
osslsigncode))
629610
((string-contains target "-linux-")
630-
(list (cond ((string-contains target "riscv64-")
631-
(make-bitcoin-cross-toolchain target
632-
#:base-libc (make-glibc-with-stack-protector
633-
(make-glibc-with-bind-now (make-glibc-without-werror glibc-2.27/bitcoin-patched)))))
634-
(else
635-
(make-bitcoin-cross-toolchain target)))))
611+
(list (make-bitcoin-cross-toolchain target)))
636612
((string-contains target "darwin")
637613
(list clang-toolchain-10 binutils cmake xorriso python-signapple))
638614
(else '())))))

contrib/guix/patches/glibc-2.24-elfm-loadaddr-dynamic-rewrite.patch

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

contrib/guix/patches/glibc-2.24-guix-prefix.patch

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

contrib/guix/patches/glibc-2.24-no-build-time-cxx-header-run.patch

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

0 commit comments

Comments
 (0)