Skip to content

Commit 1edd121

Browse files
committed
merge bitcoin#29987: build with glibc 2.31
1 parent 0949825 commit 1edd121

File tree

9 files changed

+42
-376
lines changed

9 files changed

+42
-376
lines changed

contrib/devtools/symbol-check.py

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

1616
import lief
1717

18-
# Debian 11 (Bullseye) EOL: est. 2026 https://wiki.debian.org/LTS
18+
# Debian 11 (Bullseye) EOL: 2026. https://wiki.debian.org/LTS
1919
#
20-
# - libgcc version 10.2.1 (https://packages.debian.org/search?suite=bullseye&arch=any&searchon=names&keywords=libgcc-s1)
21-
# - libc version 2.31 (https://packages.debian.org/search?suite=bullseye&arch=any&searchon=names&keywords=libc6)
20+
# - libgcc version 10.2.1 (https://packages.debian.org/bullseye/libgcc-s1)
21+
# - libc version 2.31 (https://packages.debian.org/source/bullseye/glibc)
2222
#
2323
# Ubuntu 20.04 (Focal) EOL: 2030. https://wiki.ubuntu.com/ReleaseTeam
2424
#
25-
# - libgcc version 10.3.0 (https://packages.ubuntu.com/focal/libgcc1)
25+
# - libgcc version 10.5.0 (https://packages.ubuntu.com/focal/libgcc1)
2626
# - libc version 2.31 (https://packages.ubuntu.com/focal/libc6)
2727
#
28-
# CentOS Stream 9 EOL: est. 2027 https://www.centos.org/cl-vs-cs
28+
# CentOS Stream 9 EOL: 2027. https://www.centos.org/cl-vs-cs/#end-of-life
2929
#
30-
# - libgcc version 12.2.1 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages)
31-
# - libc version 2.34 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages)
30+
# - libgcc version 12.2.1 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/)
31+
# - libc version 2.34 (https://mirror.stream.centos.org/9-stream/AppStream/x86_64/os/Packages/)
3232
#
3333
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
3434

contrib/devtools/test-security-check.py

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -58,32 +58,32 @@ def test_ELF(self):
5858
arch = get_arch(cc, source, executable)
5959

6060
if arch == lief.ARCHITECTURES.X86:
61-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
62-
(1, executable+': failed PIE NX RELRO Canary CONTROL_FLOW'))
63-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
64-
(1, executable+': failed PIE RELRO Canary CONTROL_FLOW'))
65-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
61+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
62+
(1, executable+': failed PIE NX RELRO CONTROL_FLOW'))
63+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
6664
(1, executable+': failed PIE RELRO CONTROL_FLOW'))
67-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
65+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
66+
(1, executable+': failed PIE RELRO CONTROL_FLOW'))
67+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
6868
(1, executable+': failed RELRO CONTROL_FLOW'))
69-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
69+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
7070
(1, executable+': failed separate_code CONTROL_FLOW'))
71-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
71+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
7272
(1, executable+': failed CONTROL_FLOW'))
73-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code', '-fcf-protection=full']),
73+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code', '-fcf-protection=full']),
7474
(0, ''))
7575
else:
76-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
77-
(1, executable+': failed PIE NX RELRO Canary'))
78-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fno-stack-protector','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
79-
(1, executable+': failed PIE RELRO Canary'))
80-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
76+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-zexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
77+
(1, executable+': failed PIE NX RELRO'))
78+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
79+
(1, executable+': failed PIE RELRO'))
80+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-no-pie','-fno-PIE', '-Wl,-z,separate-code']),
8181
(1, executable+': failed PIE RELRO'))
82-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
82+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-znorelro','-pie','-fPIE', '-Wl,-z,separate-code']),
8383
(1, executable+': failed RELRO'))
84-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
84+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,noseparate-code']),
8585
(1, executable+': failed separate_code'))
86-
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-fstack-protector-all','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
86+
self.assertEqual(call_security_check(cc, source, executable, ['-Wl,-znoexecstack','-Wl,-zrelro','-Wl,-z,now','-pie','-fPIE', '-Wl,-z,separate-code']),
8787
(0, ''))
8888

8989
clean_files(source, executable)

contrib/guix/manifest.scm

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ chain for " target " development."))
101101
#:key
102102
(base-gcc-for-libc linux-base-gcc)
103103
(base-kernel-headers base-linux-kernel-headers)
104-
(base-libc glibc-2.28)
104+
(base-libc glibc-2.31)
105105
(base-gcc linux-base-gcc))
106106
"Convenience wrapper around MAKE-CROSS-TOOLCHAIN with default values
107107
desirable for building Dash Core release binaries."
@@ -525,23 +525,21 @@ inspecting signatures in Mach-O binaries.")
525525
(("-rpath=") "-rpath-link="))
526526
#t))))))))
527527

528-
(define-public glibc-2.28
528+
(define-public glibc-2.31
529+
(let ((commit "8e30f03744837a85e33d84ccd34ed3abe30d37c3"))
529530
(package
530-
(inherit glibc-2.31)
531-
(version "2.28")
531+
(inherit glibc) ;; 2.35
532+
(version "2.31")
532533
(source (origin
533534
(method git-fetch)
534535
(uri (git-reference
535536
(url "https://sourceware.org/git/glibc.git")
536-
(commit "c9e58ae23402eb82877de90fd8a18519c086ed87")))
537-
(file-name (git-file-name "glibc" "c9e58ae23402eb82877de90fd8a18519c086ed87"))
537+
(commit commit)))
538+
(file-name (git-file-name "glibc" commit))
538539
(sha256
539540
(base32
540-
"0wm0if2n4z48kpn85va6yb4iac34crds2f55ddpz1hykx6jp1pb6"))
541-
(patches (search-our-patches "glibc-2.27-fcommon.patch"
542-
"glibc-2.27-guix-prefix.patch"
543-
"glibc-2.27-no-librt.patch"
544-
"glibc-2.27-powerpc-ldbrx.patch"))))
541+
"1zi0s9yy5zkisw823vivn7zlj8w6g9p3mm7lmlqiixcxdkz4dbn6"))
542+
(patches (search-our-patches "glibc-guix-prefix.patch"))))
545543
(arguments
546544
(substitute-keyword-arguments (package-arguments glibc)
547545
((#:configure-flags flags)
@@ -557,12 +555,13 @@ inspecting signatures in Mach-O binaries.")
557555
(lambda* (#:key outputs #:allow-other-keys)
558556
;; Install the rpc data base file under `$out/etc/rpc'.
559557
;; Otherwise build will fail with "Permission denied."
558+
;; Can be removed when we are building 2.32 or later.
560559
(let ((out (assoc-ref outputs "out")))
561560
(substitute* "sunrpc/Makefile"
562561
(("^\\$\\(inst_sysconfdir\\)/rpc(.*)$" _ suffix)
563562
(string-append out "/etc/rpc" suffix "\n"))
564563
(("^install-others =.*$")
565-
(string-append "install-others = " out "/etc/rpc\n"))))))))))))
564+
(string-append "install-others = " out "/etc/rpc\n")))))))))))))
566565

567566
(packages->manifest
568567
(append

contrib/guix/patches/glibc-2.27-fcommon.patch

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

contrib/guix/patches/glibc-2.27-no-librt.patch

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

0 commit comments

Comments
 (0)