diff options
author | Hennadii Stepanov <32963518+hebasto@users.noreply.github.com> | 2022-02-22 12:20:48 +0200 |
---|---|---|
committer | João Barbosa <joao.paulo.barbosa@gmail.com> | 2022-03-21 16:52:27 +0000 |
commit | 532c64a7264dd3c7329e8839547837c57da7dbe8 (patch) | |
tree | 9a358195495267b6112ebffdd58d8ccfd708b079 | |
parent | c109e7d51c9c5614aafce184c63b52ad2e859eb2 (diff) | |
download | bitcoin-532c64a7264dd3c7329e8839547837c57da7dbe8.tar.xz |
build: Fix Boost.Process test for Boost 1.78
-rw-r--r-- | configure.ac | 5 | ||||
-rw-r--r-- | src/test/system_tests.cpp | 9 | ||||
-rw-r--r-- | src/util/system.cpp | 9 |
3 files changed, 23 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 63ff6a1ebd..d8e80d3f46 100644 --- a/configure.ac +++ b/configure.ac @@ -1446,6 +1446,10 @@ if test "$use_external_signer" != "no"; then ;; *) AC_MSG_CHECKING([whether Boost.Process can be used]) + TEMP_CXXFLAGS="$CXXFLAGS" + dnl Boost 1.78 requires the following workaround. + dnl See: https://github.com/boostorg/process/issues/235 + CXXFLAGS="$CXXFLAGS -Wno-error=narrowing" TEMP_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $BOOST_CPPFLAGS" TEMP_LDFLAGS="$LDFLAGS" @@ -1456,6 +1460,7 @@ if test "$use_external_signer" != "no"; then [have_boost_process="no"]) LDFLAGS="$TEMP_LDFLAGS" CPPFLAGS="$TEMP_CPPFLAGS" + CXXFLAGS="$TEMP_CXXFLAGS" AC_MSG_RESULT([$have_boost_process]) if test "$have_boost_process" = "yes"; then use_external_signer="yes" diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index 9c6950f11f..3f5353b5a2 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -12,7 +12,16 @@ // For details see https://github.com/bitcoin/bitcoin/pull/22348. #define __kernel_entry #endif +#if defined(__GNUC__) +// Boost 1.78 requires the following workaround. +// See: https://github.com/boostorg/process/issues/235 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnarrowing" +#endif #include <boost/process.hpp> +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif #endif // ENABLE_EXTERNAL_SIGNER #include <boost/test/unit_test.hpp> diff --git a/src/util/system.cpp b/src/util/system.cpp index 8e45453d31..a7e66defcd 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -6,7 +6,16 @@ #include <util/system.h> #ifdef ENABLE_EXTERNAL_SIGNER +#if defined(__GNUC__) +// Boost 1.78 requires the following workaround. +// See: https://github.com/boostorg/process/issues/235 +#pragma GCC diagnostic push +#pragma GCC diagnostic ignored "-Wnarrowing" +#endif #include <boost/process.hpp> +#if defined(__GNUC__) +#pragma GCC diagnostic pop +#endif #endif // ENABLE_EXTERNAL_SIGNER #include <chainparamsbase.h> |