aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorW. J. van der Laan <laanwj@protonmail.com>2021-09-16 19:03:37 +0200
committerW. J. van der Laan <laanwj@protonmail.com>2021-09-16 19:03:42 +0200
commit698b4b8fac3d76ab9b9cfe08a1f186b7263630a8 (patch)
tree0d69f8925f75866c8cf1fc2ddba0e500830ca193 /src
parent0de84b732852f7d6db1f5f3f80d985c29a37fbff (diff)
parent76630cbfb9247a78c7760aa8dca62c6b599a0c7c (diff)
Merge bitcoin/bitcoin#22930: build: remove glibc back compat
76630cbfb9247a78c7760aa8dca62c6b599a0c7c doc: add glibc to dependencies.md (fanquake) a907704e7f0f1989e70b9b073c25b740e9d5003d compat: remove glibc_compat.cpp (fanquake) 62e45da94537ffaecc51441896242ef5123106a5 build: remove glibc-back-compat from build system (fanquake) 2ef0accefc1653ea0845683db8256dddf3b55e04 remove --enable-glibc-back-compat from CI and docs (fanquake) Pull request description: This removes our glibc backwards compatibility code (glibcxx sanity checks remain), which is [no-longer used for release builds](https://github.com/bitcoin/bitcoin/pull/22405). With these changes our minimum required glibc remains at 2.17, as Guix builds [are done with `--disable-thread-local`](https://github.com/bitcoin/bitcoin/blob/d2dd1697cee9d6d0f13f9cb351bce84eaa4a72b4/contrib/guix/libexec/build.sh#L242). Guix builds: ```bash d9024376ac06b836800b942fcbe8a6454866ded652e41c43d605255f840e8183 guix-build-76630cbfb924/output/aarch64-linux-gnu/SHA256SUMS.part bea9607f111b7a501e2410e59ccfca6f83ea075edb299d2f9b878860a4f1ad50 guix-build-76630cbfb924/output/aarch64-linux-gnu/bitcoin-76630cbfb924-aarch64-linux-gnu-debug.tar.gz b41d7eaec5b598f146ead32a40c0e2281d22138c02a7000fb154fe8ff341ab9d guix-build-76630cbfb924/output/aarch64-linux-gnu/bitcoin-76630cbfb924-aarch64-linux-gnu.tar.gz 9ec0e1b2cd4ca55d5c12354325d7c4552333f1bad7e620db247eb24e15500210 guix-build-76630cbfb924/output/arm-linux-gnueabihf/SHA256SUMS.part dbb3e92a3b7d6460e0d5319f49c91eb65593d8604807c1b3084c9d657b198271 guix-build-76630cbfb924/output/arm-linux-gnueabihf/bitcoin-76630cbfb924-arm-linux-gnueabihf-debug.tar.gz ff2fa70b01f92b9fba9f0216deebc3e511d84ff93a7316f6766a405160a20483 guix-build-76630cbfb924/output/arm-linux-gnueabihf/bitcoin-76630cbfb924-arm-linux-gnueabihf.tar.gz 486586b4f3e81855a52e5410127b92f6dde9d1eede2720de260b13552a4b4823 guix-build-76630cbfb924/output/dist-archive/bitcoin-76630cbfb924.tar.gz 466ccc848c39c0ca85c4575c2bfcd1bc7aba2caa5ba8a42147cce60be5120bf6 guix-build-76630cbfb924/output/powerpc64-linux-gnu/SHA256SUMS.part 4c739da127df3738e993dcef48ec8f005b7d7938060197c718e771cdd18c2087 guix-build-76630cbfb924/output/powerpc64-linux-gnu/bitcoin-76630cbfb924-powerpc64-linux-gnu-debug.tar.gz 2294fc23c170d63fc03085d56ba8653e3cf0cff15c8bd5680faa7b7552e1db07 guix-build-76630cbfb924/output/powerpc64-linux-gnu/bitcoin-76630cbfb924-powerpc64-linux-gnu.tar.gz 7be025478c51a1ba7884a7c2f090a1311651fc218d706051b1830cbc4e82ee4d guix-build-76630cbfb924/output/powerpc64le-linux-gnu/SHA256SUMS.part 30600ad6d9bfe70b68a2a4bedc733b56b26232a45d4491b1a6fa30b76cd3f690 guix-build-76630cbfb924/output/powerpc64le-linux-gnu/bitcoin-76630cbfb924-powerpc64le-linux-gnu-debug.tar.gz 70528805fae16b95d1df46011511ca1c2616fb89422c0164e30d02fa0193b6a1 guix-build-76630cbfb924/output/powerpc64le-linux-gnu/bitcoin-76630cbfb924-powerpc64le-linux-gnu.tar.gz 20f4daaa095803e9c34ed8b119f948e3e61d03b4d5814e4b15ca285c2ba5a109 guix-build-76630cbfb924/output/riscv64-linux-gnu/SHA256SUMS.part 6f969d6b6561ea87d1e54a3a643640da54e4e33d2470dbc607ad27f3a87a0f1d guix-build-76630cbfb924/output/riscv64-linux-gnu/bitcoin-76630cbfb924-riscv64-linux-gnu-debug.tar.gz 7c1e925d199d21781c96e9ee8d63d5eac995cbe2574ccedd81c0938531f694c1 guix-build-76630cbfb924/output/riscv64-linux-gnu/bitcoin-76630cbfb924-riscv64-linux-gnu.tar.gz d0f13a7a9fcd95669cbab3b637940c2014632405037959989768ec2ffa7fd861 guix-build-76630cbfb924/output/x86_64-apple-darwin18/SHA256SUMS.part ff23fbdd72fd42140bf11773866061cd5571b66d65bbd769b1345969d195b7ce guix-build-76630cbfb924/output/x86_64-apple-darwin18/bitcoin-76630cbfb924-osx-unsigned.dmg 1b51f4a7611b85d4f599291f42887643ddd59babfc6fb71284793123d8a6be33 guix-build-76630cbfb924/output/x86_64-apple-darwin18/bitcoin-76630cbfb924-osx-unsigned.tar.gz e0dc9be66c3dc9ba30c5224cf0499ef02b3b7e213081561a6d57d5cc76b3e9a7 guix-build-76630cbfb924/output/x86_64-apple-darwin18/bitcoin-76630cbfb924-osx64.tar.gz ae3fb0320a0f39dae48354fe74f3d071b16b33920b3b7b27244658439fdfbc93 guix-build-76630cbfb924/output/x86_64-linux-gnu/SHA256SUMS.part 9545ccf26a930a3f876058bb0c4965e1320a354ee2d9ce27d95f8bdd2e8679a6 guix-build-76630cbfb924/output/x86_64-linux-gnu/bitcoin-76630cbfb924-x86_64-linux-gnu-debug.tar.gz 4827206220eaa2b36ebb44b68035c6bda0cec0c2f1b27c08b8349f2f7b3f56d5 guix-build-76630cbfb924/output/x86_64-linux-gnu/bitcoin-76630cbfb924-x86_64-linux-gnu.tar.gz c2ad3ed62b2ac41a25a43e1c38869a588bf93853cae4502880adf0b66ce30369 guix-build-76630cbfb924/output/x86_64-w64-mingw32/SHA256SUMS.part a88ee3a0cb715d32cf12cb164d8fe4d9c4c810cc417426f3aacc4e7f08460271 guix-build-76630cbfb924/output/x86_64-w64-mingw32/bitcoin-76630cbfb924-win-unsigned.tar.gz 7673ac8df641d185ea7a150ed27eeee9645168e126d186c6ae935eefdff9edae guix-build-76630cbfb924/output/x86_64-w64-mingw32/bitcoin-76630cbfb924-win64-debug.zip b90d243d292d1b603d744639e5061917035bd8fba6acd0bb61f10479a200f5aa guix-build-76630cbfb924/output/x86_64-w64-mingw32/bitcoin-76630cbfb924-win64-setup-unsigned.exe fe69d000da647e0fb7ab19252149be4b45af742223b4c37630200b1d5b43de33 guix-build-76630cbfb924/output/x86_64-w64-mingw32/bitcoin-76630cbfb924-win64.zip ``` ACKs for top commit: laanwj: Code review ACK 76630cbfb9247a78c7760aa8dca62c6b599a0c7c Tree-SHA512: 6bd1e344f0f37cfb0017fb8b2b0eee41c6a043f23f8ccb2ad1d59e7f2a47f4b84fe431d7d059c409b63263a0af38be955961c4b2ba7b03538f77a0597abb7880
Diffstat (limited to 'src')
-rw-r--r--src/Makefile.am11
-rw-r--r--src/compat/glibc_compat.cpp62
2 files changed, 1 insertions, 72 deletions
diff --git a/src/Makefile.am b/src/Makefile.am
index eea98c7f22..52c8b85357 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -571,7 +571,7 @@ libbitcoin_common_a_SOURCES = \
# util: shared between all executables.
# This library *must* be included to make sure that the glibc
-# backward-compatibility objects and their sanity checks are linked.
+# sanity checks are linked.
libbitcoin_util_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_util_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
libbitcoin_util_a_SOURCES = \
@@ -619,11 +619,6 @@ if USE_LIBEVENT
libbitcoin_util_a_SOURCES += util/url.cpp
endif
-if GLIBC_BACK_COMPAT
-libbitcoin_util_a_SOURCES += compat/glibc_compat.cpp
-AM_LDFLAGS += $(COMPAT_LDFLAGS)
-endif
-
# cli: shared between bitcoin-cli and bitcoin-qt
libbitcoin_cli_a_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES)
libbitcoin_cli_a_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
@@ -751,10 +746,6 @@ if BUILD_BITCOIN_LIBS
include_HEADERS = script/bitcoinconsensus.h
libbitcoinconsensus_la_SOURCES = support/cleanse.cpp $(crypto_libbitcoin_crypto_base_a_SOURCES) $(libbitcoin_consensus_a_SOURCES)
-if GLIBC_BACK_COMPAT
- libbitcoinconsensus_la_SOURCES += compat/glibc_compat.cpp
-endif
-
libbitcoinconsensus_la_LDFLAGS = $(AM_LDFLAGS) -no-undefined $(RELDFLAGS)
libbitcoinconsensus_la_LIBADD = $(LIBSECP256K1)
libbitcoinconsensus_la_CPPFLAGS = $(AM_CPPFLAGS) -I$(builddir)/obj -I$(srcdir)/secp256k1/include -DBUILD_BITCOIN_INTERNAL
diff --git a/src/compat/glibc_compat.cpp b/src/compat/glibc_compat.cpp
deleted file mode 100644
index ff581d4a9e..0000000000
--- a/src/compat/glibc_compat.cpp
+++ /dev/null
@@ -1,62 +0,0 @@
-// Copyright (c) 2009-2020 The Bitcoin Core developers
-// Distributed under the MIT software license, see the accompanying
-// file COPYING or http://www.opensource.org/licenses/mit-license.php.
-
-#if defined(HAVE_CONFIG_H)
-#include <config/bitcoin-config.h>
-#endif
-
-#include <cstddef>
-#include <cstdint>
-
-#if defined(__i386__) || defined(__arm__)
-
-extern "C" int64_t __udivmoddi4(uint64_t u, uint64_t v, uint64_t* rp);
-
-extern "C" int64_t __wrap___divmoddi4(int64_t u, int64_t v, int64_t* rp)
-{
- int32_t c1 = 0, c2 = 0;
- int64_t uu = u, vv = v;
- int64_t w;
- int64_t r;
-
- if (uu < 0) {
- c1 = ~c1, c2 = ~c2, uu = -uu;
- }
- if (vv < 0) {
- c1 = ~c1, vv = -vv;
- }
-
- w = __udivmoddi4(uu, vv, (uint64_t*)&r);
- if (c1)
- w = -w;
- if (c2)
- r = -r;
-
- *rp = r;
- return w;
-}
-#endif
-
-extern "C" float log2f_old(float x);
-#ifdef __i386__
-__asm(".symver log2f_old,log2f@GLIBC_2.1");
-#elif defined(__amd64__)
-__asm(".symver log2f_old,log2f@GLIBC_2.2.5");
-#elif defined(__arm__)
-__asm(".symver log2f_old,log2f@GLIBC_2.4");
-#elif defined(__aarch64__)
-__asm(".symver log2f_old,log2f@GLIBC_2.17");
-#elif defined(__powerpc64__)
-# ifdef WORDS_BIGENDIAN
-__asm(".symver log2f_old,log2f@GLIBC_2.3");
-# else
-__asm(".symver log2f_old,log2f@GLIBC_2.17");
-# endif
-#elif defined(__riscv)
-__asm(".symver log2f_old,log2f@GLIBC_2.27");
-#endif
-extern "C" float __wrap_log2f(float x)
-{
- return log2f_old(x);
-}