mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 05:57:59 +01:00
Merge bitcoin/bitcoin#24397: build: Fix Boost.Process check for Boost 1.73 and older
774323e378ci: Force `--enable-external-signer` to prevent future regressions (Hennadii Stepanov)69978858a4build: Fix Boost.Process check for Boost 1.73 and older (Hennadii Stepanov)2199ef79cbbuild: Fix a non-portable use of `test` (Hennadii Stepanov)d436c488d4build, refactor: Replace tabs with spaces (Hennadii Stepanov) Pull request description: On master (5f44c5c428) Boost.Process check false fails without the `-lpthread` flag. ``` $ grep -C 2 pthread_detach config.log /usr/bin/ld: /tmp/cczCQfQv.o: in function `boost::asio::detail::posix_global_impl<boost::asio::system_context>::~posix_global_impl()': conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xa3): undefined reference to `pthread_join' /usr/bin/ld: conftest.cpp:(.text._ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED2Ev[_ZN5boost4asio6detail17posix_global_implINS0_14system_contextEED5Ev]+0xc4): undefined reference to `pthread_detach' collect2: error: ld returned 1 exit status configure:26674: $? = 1 ``` Not required for Boost 1.74+. ACKs for top commit: laanwj: Code review ACK774323e378, is a bugfix/workaround, seems fine to merge last minute for 23.0. Tree-SHA512: 2a9d4b67fd8910e107af972d8c223286b7c933bc310616f86c8b6d8c903438916980fc76bd7e37f2698f6ce5361dc706cbf2933d1ac2c081bcabe1b83ca7d6b6
This commit is contained in:
12
configure.ac
12
configure.ac
@@ -359,7 +359,7 @@ esac
|
||||
if test "$enable_debug" = "yes"; then
|
||||
dnl Clear default -g -O2 flags
|
||||
if test "$CXXFLAGS_overridden" = "no"; then
|
||||
CXXFLAGS=""
|
||||
CXXFLAGS=""
|
||||
fi
|
||||
|
||||
dnl Disable all optimizations
|
||||
@@ -978,14 +978,14 @@ AC_CHECK_DECLS([setsid])
|
||||
AC_CHECK_DECLS([pipe2])
|
||||
|
||||
AC_CHECK_DECLS([le16toh, le32toh, le64toh, htole16, htole32, htole64, be16toh, be32toh, be64toh, htobe16, htobe32, htobe64],,,
|
||||
[#if HAVE_ENDIAN_H
|
||||
[#if HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#elif HAVE_SYS_ENDIAN_H
|
||||
#include <sys/endian.h>
|
||||
#endif])
|
||||
|
||||
AC_CHECK_DECLS([bswap_16, bswap_32, bswap_64],,,
|
||||
[#if HAVE_BYTESWAP_H
|
||||
[#if HAVE_BYTESWAP_H
|
||||
#include <byteswap.h>
|
||||
#endif])
|
||||
|
||||
@@ -1438,11 +1438,15 @@ if test "$use_external_signer" != "no"; then
|
||||
;;
|
||||
*)
|
||||
AC_MSG_CHECKING([whether Boost.Process can be used])
|
||||
TEMP_LDFLAGS="$LDFLAGS"
|
||||
dnl Boost 1.73 and older require the following workaround.
|
||||
LDFLAGS="$LDFLAGS $PTHREAD_CFLAGS"
|
||||
AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]])],
|
||||
[have_boost_process="yes"],
|
||||
[have_boost_process="no"])
|
||||
LDFLAGS="$TEMP_LDFLAGS"
|
||||
AC_MSG_RESULT([$have_boost_process])
|
||||
if test "$have_boost_process" == "yes"; then
|
||||
if test "$have_boost_process" = "yes"; then
|
||||
use_external_signer="yes"
|
||||
AC_DEFINE([ENABLE_EXTERNAL_SIGNER], [1], [Define if external signer support is enabled])
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user