Skip to content

Commit c492a4e

Browse files
committed
merge bitcoin#22930: remove glibc back compat
1 parent 1a3bd39 commit c492a4e

File tree

11 files changed

+11
-149
lines changed

11 files changed

+11
-149
lines changed

ci/test/00_setup_env_arm.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,4 @@ export RUN_INTEGRATION_TESTS=false
2626
export GOAL="install"
2727
# -Wno-psabi is to disable ABI warnings: "note: parameter passing for argument of type ... changed in GCC 7.1"
2828
# This could be removed once the ABI change warning does not show up by default
29-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports --enable-suppress-external-warnings --enable-werror CXXFLAGS=-Wno-psabi"
29+
export BITCOIN_CONFIG="--enable-reduce-exports --enable-suppress-external-warnings --enable-werror CXXFLAGS=-Wno-psabi"

ci/test/00_setup_env_native_cxx20.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ export CPPFLAGS="-DDEBUG_LOCKORDER -DENABLE_DASH_DEBUG -DARENA_DEBUG"
1313
export PYZMQ=true
1414
export RUN_INTEGRATION_TESTS=false
1515
export GOAL="install"
16-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-zmq --enable-reduce-exports --enable-crash-hooks --enable-c++20 --enable-suppress-external-warnings --enable-werror"
16+
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --enable-crash-hooks --enable-c++20 --enable-suppress-external-warnings --enable-werror"
1717

ci/test/00_setup_env_native_fuzz.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,4 @@ export RUN_UNIT_TESTS=false
1717
export RUN_INTEGRATION_TESTS=false
1818
export RUN_FUZZ_TESTS=true
1919
export GOAL="install"
20-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-zmq --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address,undefined --enable-c++17 CC=clang CXX=clang++"
20+
export BITCOIN_CONFIG="--enable-zmq --disable-ccache --enable-fuzz --with-sanitizers=fuzzer,address,undefined --enable-c++17 CC=clang CXX=clang++"

ci/test/00_setup_env_native_nowallet.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export CONTAINER_NAME=ci_native_nowallet
1010
export PACKAGES="python3-zmq"
1111
export DEP_OPTS="NO_WALLET=1"
1212
export GOAL="install"
13-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-reduce-exports"
13+
export BITCOIN_CONFIG="--enable-reduce-exports"

ci/test/00_setup_env_native_qt5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,4 +14,4 @@ export DEP_OPTS="NO_UPNP=1 DEBUG=1"
1414
export RUN_UNIT_TESTS_SEQUENTIAL="true"
1515
export RUN_UNIT_TESTS="false"
1616
export GOAL="install"
17-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-zmq --enable-reduce-exports LDFLAGS=-static-libstdc++"
17+
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports LDFLAGS=-static-libstdc++"

ci/test/00_setup_env_native_sqlite.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ export CONTAINER_NAME=ci_native_sqlite
1010
export PACKAGES="python3-zmq qtbase5-dev qttools5-dev-tools libdbus-1-dev libharfbuzz-dev"
1111
export DEP_OPTS="NO_BDB=1 NO_UPNP=1 DEBUG=1"
1212
export GOAL="install"
13-
export BITCOIN_CONFIG="--enable-glibc-back-compat --enable-zmq --enable-reduce-exports --with-sqlite --without-bdb LDFLAGS=-static-libstdc++"
13+
export BITCOIN_CONFIG="--enable-zmq --enable-reduce-exports --with-sqlite --without-bdb LDFLAGS=-static-libstdc++"

configure.ac

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -233,15 +233,9 @@ AC_ARG_ENABLE([lcov-branch-coverage],
233233
[use_lcov_branch=yes],
234234
[use_lcov_branch=no])
235235

236-
AC_ARG_ENABLE([glibc-back-compat],
237-
[AS_HELP_STRING([--enable-glibc-back-compat],
238-
[enable backwards compatibility with glibc])],
239-
[use_glibc_compat=$enableval],
240-
[use_glibc_compat=no])
241-
242236
AC_ARG_ENABLE([threadlocal],
243237
[AS_HELP_STRING([--enable-threadlocal],
244-
[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)])],
238+
[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)])],
245239
[use_thread_local=$enableval],
246240
[use_thread_local=auto])
247241

@@ -860,24 +854,6 @@ AX_GCC_FUNC_ATTRIBUTE([visibility])
860854
AX_GCC_FUNC_ATTRIBUTE([dllexport])
861855
AX_GCC_FUNC_ATTRIBUTE([dllimport])
862856

863-
if test x$use_glibc_compat != xno; then
864-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=__divmoddi4]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=__divmoddi4"])
865-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2f]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2f"])
866-
case $host in
867-
powerpc64* | ppc64*)
868-
AX_CHECK_LINK_FLAG([[-Wl,--no-tls-get-addr-optimize]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--no-tls-get-addr-optimize"])
869-
;;
870-
esac
871-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log2]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log2"])
872-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=log]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=log"])
873-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=pow]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=pow"])
874-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=exp]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=exp"])
875-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=exp2]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=exp2"])
876-
AX_CHECK_LINK_FLAG([[-Wl,--wrap=fcntl]], [COMPAT_LDFLAGS="$COMPAT_LDFLAGS -Wl,--wrap=fcntl"])
877-
else
878-
AC_SEARCH_LIBS([clock_gettime],[rt])
879-
fi
880-
881857
if test "x$enable_gprof" = xyes; then
882858
dnl -pg is incompatible with -pie. Since hardening and profiling together doesn't make sense,
883859
dnl we simply make them mutually exclusive here. Additionally, hardened toolchains may force
@@ -1042,7 +1018,7 @@ AC_LINK_IFELSE([AC_LANG_SOURCE([
10421018
]
10431019
)
10441020

1045-
if test "x$use_thread_local" = xyes || { test "x$use_thread_local" = xauto && test "x$use_glibc_compat" = xno; }; then
1021+
if test "x$use_thread_local" = xyes || test "x$use_thread_local" = xauto; then
10461022
TEMP_LDFLAGS="$LDFLAGS"
10471023
LDFLAGS="$TEMP_LDFLAGS $PTHREAD_CFLAGS"
10481024
AC_MSG_CHECKING([for thread_local support])
@@ -1733,7 +1709,6 @@ AM_CONDITIONAL([ENABLE_QT_TESTS],[test x$BUILD_TEST_QT = xyes])
17331709
AM_CONDITIONAL([ENABLE_BENCH],[test x$use_bench = xyes])
17341710
AM_CONDITIONAL([USE_QRCODE], [test x$use_qr = xyes])
17351711
AM_CONDITIONAL([USE_LCOV],[test x$use_lcov = xyes])
1736-
AM_CONDITIONAL([GLIBC_BACK_COMPAT],[test x$use_glibc_compat = xyes])
17371712
AM_CONDITIONAL([HARDEN],[test x$use_hardening = xyes])
17381713
AM_CONDITIONAL([ENABLE_SSE42],[test x$enable_sse42 = xyes])
17391714
AM_CONDITIONAL([ENABLE_SSE41],[test x$enable_sse41 = xyes])
@@ -1772,7 +1747,6 @@ AC_SUBST(DEBUG_CPPFLAGS)
17721747
AC_SUBST(WARN_CXXFLAGS)
17731748
AC_SUBST(NOWARN_CXXFLAGS)
17741749
AC_SUBST(DEBUG_CXXFLAGS)
1775-
AC_SUBST(COMPAT_LDFLAGS)
17761750
AC_SUBST(ERROR_CXXFLAGS)
17771751
AC_SUBST(GPROF_CXXFLAGS)
17781752
AC_SUBST(GPROF_LDFLAGS)

contrib/gitian-descriptors/gitian-linux.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ script: |
4242
4343
WRAP_DIR=$HOME/wrapped
4444
HOSTS="x86_64-linux-gnu aarch64-linux-gnu riscv64-linux-gnu"
45-
CONFIGFLAGS="--enable-glibc-back-compat --enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary --enable-crash-hooks"
45+
CONFIGFLAGS="--enable-reduce-exports --disable-bench --disable-gui-tests --disable-fuzz-binary --enable-crash-hooks"
4646
FAKETIME_HOST_PROGS="gcc g++"
4747
FAKETIME_PROGS="date ar ranlib nm"
4848
HOST_CFLAGS="-O2 -g"

doc/build-unix.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ To build executables for ARM:
332332
cd depends
333333
make HOST=arm-linux-gnueabihf NO_QT=1
334334
cd ..
335-
./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-glibc-back-compat --enable-reduce-exports LDFLAGS=-static-libstdc++
335+
./configure --prefix=$PWD/depends/arm-linux-gnueabihf --enable-reduce-exports LDFLAGS=-static-libstdc++
336336
make
337337

338338

src/Makefile.am

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

697697
# util: shared between all executables.
698698
# This library *must* be included to make sure that the glibc
699-
# backward-compatibility objects and their sanity checks are linked.
699+
# sanity checks are linked.
700700
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
701701
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
702702
libbitcoin_util_a_SOURCES = \
@@ -740,11 +740,6 @@ libbitcoin_util_a_SOURCES = \
740740
util/url.cpp \
741741
$(BITCOIN_CORE_H)
742742

743-
if GLIBC_BACK_COMPAT
744-
libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
745-
AM_LDFLAGS += $(COMPAT_LDFLAGS)
746-
endif
747-
748743
# cli: shared between dash-cli and dash-qt
749744
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
750745
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
@@ -861,10 +856,6 @@ if BUILD_BITCOIN_LIBS
861856
include_HEADERS = script/bitcoinconsensus.h
862857
libdashconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
863858

864-
if GLIBC_BACK_COMPAT
865-
libdashconsensus_la_SOURCES += compat/glibc_compat.cpp
866-
endif
867-
868859
libdashconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
869860
libdashconsensus_la_LIBADD = $(LIBDASHBLS) $(LIBSECP256K1) $(GMP_LIBS)
870861
libdashconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL

0 commit comments

Comments
 (0)