Skip to content

Commit 62e45da

Browse files
committed
build: remove glibc-back-compat from build system
At this point, or minimum required glibc is implicitly 2.18, due to thread_local support being enabled by default. However, users can disable thread_local support to maintain 2.17 ccompat for now, which is currently done in the Guix build.
1 parent 2ef0acc commit 62e45da

File tree

2 files changed

+4
-31
lines changed

2 files changed

+4
-31
lines changed

configure.ac

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -240,15 +240,9 @@ AC_ARG_ENABLE([lcov-branch-coverage],
240240
[use_lcov_branch=yes],
241241
[use_lcov_branch=no])
242242

243-
AC_ARG_ENABLE([glibc-back-compat],
244-
[AS_HELP_STRING([--enable-glibc-back-compat],
245-
[enable backwards compatibility with glibc])],
246-
[use_glibc_compat=$enableval],
247-
[use_glibc_compat=no])
248-
249243
AC_ARG_ENABLE([threadlocal],
250244
[AS_HELP_STRING([--enable-threadlocal],
251-
[enable features that depend on the c++ thread_local keyword (currently just thread names in debug logs). (default is to enabled if there is platform support and glibc-back-compat is not enabled)])],
245+
[enable features that depend on the c++ thread_local keyword (currently just thread names in debug logs). (default is to enable if there is platform support)])],
252246
[use_thread_local=$enableval],
253247
[use_thread_local=auto])
254248

@@ -863,17 +857,7 @@ if test x$ac_cv_sys_large_files != x &&
863857
CPPFLAGS="$CPPFLAGS -D_LARGE_FILES=$ac_cv_sys_large_files"
864858
fi
865859

866-
if test x$use_glibc_compat != xno; then
867-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
868-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
869-
case $host in
870-
powerpc64* | ppc64*)
871-
AX_CHECK_LINK_FLAG([[-Wl,--no-tls-get-addr-optimize]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--no-tls-get-addr-optimize"])
872-
;;
873-
esac
874-
else
875-
AC_SEARCH_LIBS([clock_gettime],[rt])
876-
fi
860+
AC_SEARCH_LIBS([clock_gettime],[rt])
877861

878862
if test "x$enable_gprof" = xyes; then
879863
dnl -pg is incompatible with -pie. Since hardening and profiling together doesn't make sense,
@@ -1065,7 +1049,7 @@ AC_COMPILE_IFELSE([AC_LANG_SOURCE([
10651049
dnl thread_local is currently disabled when building with glibc back compat.
10661050
dnl Our minimum supported glibc is 2.17, however support for thread_local
10671051
dnl did not arrive in glibc until 2.18.
1068-
if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && test "x$use_glibc_compat" = xno; }; then
1052+
if test "x$use_thread_local" = xyes || test "x$use_thread_local" = xauto; then
10691053
TEMP_LDFLAGS="$LDFLAGS"
10701054
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"
10711055
AC_MSG_CHECKING([for thread_local support])
@@ -1806,7 +1790,6 @@ AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
18061790
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
18071791
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
18081792
AM_CONDITIONAL([USE_LIBEVENT],[test x$use_libevent = xyes])
1809-
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
18101793
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
18111794
AM_CONDITIONAL([ENABLE_SSE42],[test x$enable_sse42 = xyes])
18121795
AM_CONDITIONAL([ENABLE_SSE41],[test x$enable_sse41 = xyes])
@@ -1849,7 +1832,6 @@ AC_SUBST(DEBUG_CPPFLAGS)
18491832
AC_SUBST(WARN_CXXFLAGS)
18501833
AC_SUBST(NOWARN_CXXFLAGS)
18511834
AC_SUBST(DEBUG_CXXFLAGS)
1852-
AC_SUBST(COMPAT_LDFLAGS)
18531835
AC_SUBST(ERROR_CXXFLAGS)
18541836
AC_SUBST(GPROF_CXXFLAGS)
18551837
AC_SUBST(GPROF_LDFLAGS)

src/Makefile.am

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -571,7 +571,7 @@ libbitcoin_common_a_SOURCES = \
571571

572572
# util: shared between all executables.
573573
# This library *must* be included to make sure that the glibc
574-
# backward-compatibility objects and their sanity checks are linked.
574+
# sanity checks are linked.
575575
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
576576
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
577577
libbitcoin_util_a_SOURCES = \
@@ -619,11 +619,6 @@ if USE_LIBEVENT
619619
libbitcoin_util_a_SOURCES += util/url.cpp
620620
endif
621621

622-
if GLIBC_BACK_COMPAT
623-
libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
624-
AM_LDFLAGS += $(COMPAT_LDFLAGS)
625-
endif
626-
627622
# cli: shared between bitcoin-cli and bitcoin-qt
628623
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
629624
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
@@ -751,10 +746,6 @@ if BUILD_BITCOIN_LIBS
751746
include_HEADERS = script/bitcoinconsensus.h
752747
libbitcoinconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
753748

754-
if GLIBC_BACK_COMPAT
755-
libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
756-
endif
757-
758749
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
759750
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
760751
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL

0 commit comments

Comments
 (0)