Skip to content

Commit dbfca4a

Browse files
committed
build: require glibc 2.18+ for release builds
From what I can see the only platform this drops support for is CentOS 7. CentOS 7 reached the end of it's "full update" support at the end of 2020. It does receive maintenance updates until 2024, however I don't think supporting glibc 2.17 until 2024 is realistic. Note that anyone wanting to self-compile and target a glibc 2.17 runtime could build with --disable-threadlocal. glibc 2.18 was released in August 2013. https://sourceware.org/legacy-ml/libc-alpha/2013-08/msg00160.html
1 parent 41e6909 commit dbfca4a

File tree

5 files changed

+19
-29
lines changed

5 files changed

+19
-29
lines changed

configure.ac

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,6 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
10441044
[AC_MSG_RESULT([no])]
10451045
)
10461046

1047-
dnl thread_local is currently disabled when building with glibc back compat.
1048-
dnl Our minimum supported glibc is 2.17, however support for thread_local
1049-
dnl did not arrive in glibc until 2.18.
10501047
if test "x$use_thread_local" = xyes || test "x$use_thread_local" = xauto; then
10511048
TEMP_LDFLAGS="$LDFLAGS"
10521049
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"

contrib/devtools/symbol-check.py

Lines changed: 16 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -19,35 +19,31 @@
1919
# https://github.com/lief-project/LIEF/pull/562
2020
LIEF_ELF_ARCH_RISCV = lief.ELF.ARCH(243)
2121

22-
# Debian 8 (Jessie) EOL: 2020. https://wiki.debian.org/DebianReleases#Production_Releases
22+
# Debian 9 (Stretch) EOL: 2022. https://wiki.debian.org/DebianReleases#Production_Releases
2323
#
24-
# - g++ version 4.9.2 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=g%2B%2B)
25-
# - libc version 2.19 (https://packages.debian.org/search?suite=jessie&arch=any&searchon=names&keywords=libc6)
24+
# - g++ version 6.3.0 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=g%2B%2B)
25+
# - libc version 2.24 (https://packages.debian.org/search?suite=stretch&arch=any&searchon=names&keywords=libc6)
2626
#
27-
# Ubuntu 16.04 (Xenial) EOL: 2024. https://wiki.ubuntu.com/Releases
27+
# Ubuntu 16.04 (Xenial) EOL: 2026. https://wiki.ubuntu.com/Releases
2828
#
29-
# - g++ version 5.3.1 (https://packages.ubuntu.com/search?keywords=g%2B%2B&searchon=names&suite=xenial&section=all)
30-
# - libc version 2.23.0 (https://packages.ubuntu.com/search?keywords=libc6&searchon=names&suite=xenial&section=all)
29+
# - g++ version 5.3.1
30+
# - libc version 2.23
3131
#
32-
# CentOS 7 EOL: 2024. https://wiki.centos.org/FAQ/General
32+
# CentOS Stream 8 EOL: 2024. https://wiki.centos.org/About/Product
3333
#
34-
# - g++ version 4.8.5 (http://mirror.centos.org/centos/7/os/x86_64/Packages/)
35-
# - libc version 2.17 (http://mirror.centos.org/centos/7/os/x86_64/Packages/)
36-
#
37-
# Taking the minimum of these as our target.
38-
#
39-
# According to GNU ABI document (https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html) this corresponds to:
40-
# GCC 4.8.5: GCC_4.8.0
41-
# (glibc) GLIBC_2_17
34+
# - g++ version 8.5.0 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
35+
# - libc version 2.28 (http://mirror.centos.org/centos/8-stream/AppStream/x86_64/os/Packages/)
4236
#
37+
# See https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html for more info.
38+
4339
MAX_VERSIONS = {
4440
'GCC': (4,8,0),
4541
'GLIBC': {
46-
lief.ELF.ARCH.i386: (2,17),
47-
lief.ELF.ARCH.x86_64: (2,17),
48-
lief.ELF.ARCH.ARM: (2,17),
49-
lief.ELF.ARCH.AARCH64:(2,17),
50-
lief.ELF.ARCH.PPC64: (2,17),
42+
lief.ELF.ARCH.i386: (2,18),
43+
lief.ELF.ARCH.x86_64: (2,18),
44+
lief.ELF.ARCH.ARM: (2,18),
45+
lief.ELF.ARCH.AARCH64:(2,18),
46+
lief.ELF.ARCH.PPC64: (2,18),
5147
LIEF_ELF_ARCH_RISCV: (2,27),
5248
},
5349
'LIBATOMIC': (1,0),

contrib/devtools/test-symbol-check.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def test_ELF(self):
4444
self.skipTest("test not available for RISC-V")
4545

4646
# nextup was introduced in GLIBC 2.24, so is newer than our supported
47-
# glibc (2.17), and available in our release build environment (2.24).
47+
# glibc (2.18), and available in our release build environment (2.24).
4848
with open(source, 'w', encoding="utf8") as f:
4949
f.write('''
5050
#define _GNU_SOURCE

contrib/guix/libexec/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -238,9 +238,6 @@ mkdir -p "$OUTDIR"
238238

239239
# CONFIGFLAGS
240240
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary"
241-
case "$HOST" in
242-
*linux*) CONFIGFLAGS+=" --disable-threadlocal" ;;
243-
esac
244241

245242
# CFLAGS
246243
HOST_CFLAGS="-O2 -g"
@@ -263,7 +260,7 @@ case "$HOST" in
263260
*mingw*) HOST_LDFLAGS="-Wl,--no-insert-timestamp" ;;
264261
esac
265262

266-
# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.17, by
263+
# Using --no-tls-get-addr-optimize retains compatibility with glibc 2.18, by
267264
# avoiding a PowerPC64 optimisation available in glibc 2.22 and later.
268265
# https://sourceware.org/binutils/docs-2.35/ld/PowerPC64-ELF64.html
269266
case "$HOST" in

doc/dependencies.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ These are the dependencies currently used by Bitcoin Core. You can find instruct
1212
| fontconfig | [2.12.1](https://www.freedesktop.org/software/fontconfig/release/) | | No | Yes | |
1313
| FreeType | [2.7.1](https://download.savannah.gnu.org/releases/freetype) | | No | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) (Android only) |
1414
| GCC | | [8.1](https://gcc.gnu.org/) (C++17 & std::filesystem support) | | | |
15-
| glibc | | [2.17](https://www.gnu.org/software/libc/) | | | | |
15+
| glibc | | [2.18](https://www.gnu.org/software/libc/) | | | | |
1616
| HarfBuzz-NG | | | | | [Yes](https://github.com/bitcoin/bitcoin/blob/master/depends/packages/qt.mk) |
1717
| libevent | [2.1.12-stable](https://github.com/libevent/libevent/releases) | [2.0.21](https://github.com/bitcoin/bitcoin/pull/18676) | No | | |
1818
| libnatpmp | git commit [4536032...](https://github.com/miniupnp/libnatpmp/tree/4536032ae32268a45c073a4d5e91bbab4534773a) | | No | | |

0 commit comments

Comments
 (0)