Skip to content

Commit

Permalink
build: Attempt #1
Browse files Browse the repository at this point in the history
  • Loading branch information
hebasto committed May 7, 2021
1 parent 9313c4e commit fe3cb56
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1779,6 +1779,20 @@ if test x$build_bitcoin_wallet$build_bitcoin_cli$build_bitcoin_tx$build_bitcoin_
AC_MSG_ERROR([No targets! Please specify at least one of: --with-utils --with-libs --with-daemon --with-gui --enable-bench or --enable-tests])
fi

if test x$enable_fuzz_binary = xyes; then
AC_LINK_IFELSE(
[AC_LANG_PROGRAM([[
#include <stdbool.h>
#include <stdint.h>
#if defined(__has_builtin) && __has_builtin(__builtin_mul_overflow)
bool test(int x, int y, int* prod) { return __builtin_mul_overflow(x, y, prod); }
#endif
]])],
[FUZZ_BINARY_LDFLAGS="empty"],
[FUZZ_BINARY_LDFLAGS="--rtlib=compiler-rt -lgcc_s"]
)
fi

AM_CONDITIONAL([TARGET_DARWIN], [test x$TARGET_OS = xdarwin])
AM_CONDITIONAL([BUILD_DARWIN], [test x$BUILD_OS = xdarwin])
AM_CONDITIONAL([TARGET_LINUX], [test x$TARGET_OS = xlinux])
Expand Down Expand Up @@ -1977,3 +1991,5 @@ echo " CXXFLAGS = $DEBUG_CXXFLAGS $HARDENED_CXXFLAGS $WARN_CXXFLAGS $NOW
echo " LDFLAGS = $PTHREAD_LIBS $HARDENED_LDFLAGS $GPROF_LDFLAGS $LDFLAGS"
echo " ARFLAGS = $ARFLAGS"
echo
echo " FUZZ_BINARY_LDFLAGS = $FUZZ_BINARY_LDFLAGS"
echo

0 comments on commit fe3cb56

Please sign in to comment.