Skip to content

Commit fa223ba

Browse files
author
MarcoFalke
committed
Revert "build: Fix undefined reference to __mulodi4"
This reverts commit e4c8bb6.
1 parent fa7c751 commit fa223ba

File tree

4 files changed

+9
-49
lines changed

4 files changed

+9
-49
lines changed

build-aux/m4/bitcoin_runtime_lib.m4

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

configure.ac

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1338,8 +1338,6 @@ if test "$enable_fuzz_binary" = "yes"; then
13381338
]],[[
13391339
*/ int not_main() {
13401340
]])])
1341-
1342-
CHECK_RUNTIME_LIB
13431341
fi
13441342

13451343
if test "$enable_wallet" != "no"; then

src/Makefile.test.include

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ if ENABLE_FUZZ_BINARY
240240
test_fuzz_fuzz_CPPFLAGS = $(AM_CPPFLAGS) $(BITCOIN_INCLUDES) $(BOOST_CPPFLAGS)
241241
test_fuzz_fuzz_CXXFLAGS = $(AM_CXXFLAGS) $(PIE_FLAGS)
242242
test_fuzz_fuzz_LDADD = $(FUZZ_SUITE_LD_COMMON)
243-
test_fuzz_fuzz_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS) $(RUNTIME_LDFLAGS)
243+
test_fuzz_fuzz_LDFLAGS = $(RELDFLAGS) $(AM_LDFLAGS) $(LIBTOOL_APP_LDFLAGS) $(PTHREAD_FLAGS)
244244
test_fuzz_fuzz_SOURCES = \
245245
$(FUZZ_WALLET_SRC) \
246246
test/fuzz/addition_overflow.cpp \

src/test/fuzz/multiplication_overflow.cpp

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@
22
// Distributed under the MIT software license, see the accompanying
33
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
44

5-
#if defined(HAVE_CONFIG_H)
6-
#include <config/bitcoin-config.h>
7-
#endif
8-
95
#include <test/fuzz/FuzzedDataProvider.h>
106
#include <test/fuzz/fuzz.h>
117
#include <test/fuzz/util.h>
@@ -14,6 +10,14 @@
1410
#include <string>
1511
#include <vector>
1612

13+
#if defined(__has_builtin)
14+
#if __has_builtin(__builtin_mul_overflow)
15+
#define HAVE_BUILTIN_MUL_OVERFLOW
16+
#endif
17+
#elif defined(__GNUC__)
18+
#define HAVE_BUILTIN_MUL_OVERFLOW
19+
#endif
20+
1721
namespace {
1822
template <typename T>
1923
void TestMultiplicationOverflow(FuzzedDataProvider& fuzzed_data_provider)

0 commit comments

Comments
 (0)