Prevent unary_function warning and other warnings #449
This commit is contained in:
26
configure.ac
26
configure.ac
@@ -644,6 +644,17 @@ AX_BOOST_PROGRAM_OPTIONS
|
|||||||
AX_BOOST_THREAD
|
AX_BOOST_THREAD
|
||||||
AX_BOOST_CHRONO
|
AX_BOOST_CHRONO
|
||||||
|
|
||||||
|
dnl Prevent use of std::unary_function, which was removed in C++17,
|
||||||
|
dnl and will generate warnings with newer compilers for Boost
|
||||||
|
dnl older than 1.80.
|
||||||
|
dnl See: https://github.com/boostorg/container_hash/issues/22, https://github.com/boostorg/config/pull/430.
|
||||||
|
|
||||||
|
dnl _HAS_AUTO_PTR_ETC check required only for boost 1.72 and older, for 1.73+ we can use BOOST_NO_CXX98_FUNCTION_BASE
|
||||||
|
AX_CHECK_PREPROC_FLAG([-D_HAS_AUTO_PTR_ETC=0], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -D_HAS_AUTO_PTR_ETC=0"], [], [$CXXFLAG_WERROR],
|
||||||
|
[AC_LANG_PROGRAM([[#include <boost/config.hpp>]])])
|
||||||
|
AX_CHECK_PREPROC_FLAG([-DBOOST_NO_CXX98_FUNCTION_BASE], [BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"], [], [$CXXFLAG_WERROR],
|
||||||
|
[AC_LANG_PROGRAM([[#include <boost/config.hpp>]])])
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test x$use_reduce_exports = xyes; then
|
if test x$use_reduce_exports = xyes; then
|
||||||
@@ -947,11 +958,12 @@ echo
|
|||||||
echo " target os = $TARGET_OS"
|
echo " target os = $TARGET_OS"
|
||||||
echo " build os = $BUILD_OS"
|
echo " build os = $BUILD_OS"
|
||||||
echo
|
echo
|
||||||
echo " CC = $CC"
|
echo " CC = $CC"
|
||||||
echo " CFLAGS = $CFLAGS"
|
echo " CFLAGS = $CFLAGS"
|
||||||
echo " CPPFLAGS = $CPPFLAGS"
|
echo " CPPFLAGS = $CPPFLAGS"
|
||||||
echo " CXX = $CXX"
|
echo " CXX = $CXX"
|
||||||
echo " CXXFLAGS = $CXXFLAGS"
|
echo " CXXFLAGS = $CXXFLAGS"
|
||||||
echo " LDFLAGS = $LDFLAGS"
|
echo " BOOST_CPPFLAGS = $BOOST_CPPFLAGS"
|
||||||
echo " ARFLAGS = $ARFLAGS"
|
echo " LDFLAGS = $LDFLAGS"
|
||||||
|
echo " ARFLAGS = $ARFLAGS"
|
||||||
echo
|
echo
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ $(package)_sha256_hash=59c9b274bc451cf91a9ba1dd2c7fdcaf5d60b1b3aa83f2c9fa143417c
|
|||||||
$(package)_download_path=https://git.hush.is/attachments
|
$(package)_download_path=https://git.hush.is/attachments
|
||||||
$(package)_file_name=7b13759e-8623-4e48-ae08-f78502f4b6a5
|
$(package)_file_name=7b13759e-8623-4e48-ae08-f78502f4b6a5
|
||||||
$(package)_download_file=7b13759e-8623-4e48-ae08-f78502f4b6a5
|
$(package)_download_file=7b13759e-8623-4e48-ae08-f78502f4b6a5
|
||||||
$(package)_patches=fix-Solaris.patch
|
$(package)_patches=fix-Solaris.patch ignore_wnonnull_gcc_11.patch range_enums_clang_16.patch
|
||||||
|
|
||||||
define $(package)_set_vars
|
define $(package)_set_vars
|
||||||
$(package)_config_opts_release=variant=release
|
$(package)_config_opts_release=variant=release
|
||||||
@@ -32,7 +32,9 @@ endef
|
|||||||
|
|
||||||
define $(package)_preprocess_cmds
|
define $(package)_preprocess_cmds
|
||||||
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam&& \
|
echo "using $(boost_toolset_$(host_os)) : : $($(package)_cxx) : <cxxflags>\"$($(package)_cxxflags) $($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$(boost_archiver_$(host_os))\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam&& \
|
||||||
patch -p1 < $($(package)_patch_dir)/fix-Solaris.patch
|
patch -p1 < $($(package)_patch_dir)/fix-Solaris.patch &&\
|
||||||
|
patch -p2 < $($(package)_patch_dir)/ignore_wnonnull_gcc_11.patch &&\
|
||||||
|
patch -p2 < $($(package)_patch_dir)/range_enums_clang_16.patch
|
||||||
endef
|
endef
|
||||||
|
|
||||||
define $(package)_config_cmds
|
define $(package)_config_cmds
|
||||||
|
|||||||
68
depends/patches/boost/ignore_wnonnull_gcc_11.patch
Normal file
68
depends/patches/boost/ignore_wnonnull_gcc_11.patch
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
diff --git a/include/boost/concept/detail/general.hpp b/include/boost/concept/detail/general.hpp
|
||||||
|
index eeb08750..8d7d6f69 100644
|
||||||
|
--- a/include/boost/concept/detail/general.hpp
|
||||||
|
+++ b/include/boost/concept/detail/general.hpp
|
||||||
|
@@ -28,7 +28,14 @@ namespace detail
|
||||||
|
template <class Model>
|
||||||
|
struct requirement
|
||||||
|
{
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic push
|
||||||
|
+# pragma GCC diagnostic ignored "-Wnonnull"
|
||||||
|
+# endif
|
||||||
|
static void failed() { ((Model*)0)->~Model(); }
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic pop
|
||||||
|
+# endif
|
||||||
|
};
|
||||||
|
|
||||||
|
struct failed {};
|
||||||
|
@@ -36,7 +43,14 @@ struct failed {};
|
||||||
|
template <class Model>
|
||||||
|
struct requirement<failed ************ Model::************>
|
||||||
|
{
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic push
|
||||||
|
+# pragma GCC diagnostic ignored "-Wnonnull"
|
||||||
|
+# endif
|
||||||
|
static void failed() { ((Model*)0)->~Model(); }
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic pop
|
||||||
|
+# endif
|
||||||
|
};
|
||||||
|
|
||||||
|
# ifdef BOOST_OLD_CONCEPT_SUPPORT
|
||||||
|
@@ -44,7 +58,14 @@ struct requirement<failed ************ Model::************>
|
||||||
|
template <class Model>
|
||||||
|
struct constraint
|
||||||
|
{
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic push
|
||||||
|
+# pragma GCC diagnostic ignored "-Wnonnull"
|
||||||
|
+# endif
|
||||||
|
static void failed() { ((Model*)0)->constraints(); }
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic pop
|
||||||
|
+# endif
|
||||||
|
};
|
||||||
|
|
||||||
|
template <class Model>
|
||||||
|
diff --git a/include/boost/concept/usage.hpp b/include/boost/concept/usage.hpp
|
||||||
|
index 373de63a..fe88b5f5 100644
|
||||||
|
--- a/include/boost/concept/usage.hpp
|
||||||
|
+++ b/include/boost/concept/usage.hpp
|
||||||
|
@@ -13,7 +13,14 @@ namespace boost { namespace concepts {
|
||||||
|
template <class Model>
|
||||||
|
struct usage_requirements
|
||||||
|
{
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic push
|
||||||
|
+# pragma GCC diagnostic ignored "-Wnonnull"
|
||||||
|
+# endif
|
||||||
|
~usage_requirements() { ((Model*)0)->~Model(); }
|
||||||
|
+# if defined(BOOST_GCC) && (BOOST_GCC >= 110000)
|
||||||
|
+# pragma GCC diagnostic pop
|
||||||
|
+# endif
|
||||||
|
};
|
||||||
|
|
||||||
|
# if BOOST_WORKAROUND(__GNUC__, <= 3)
|
||||||
75
depends/patches/boost/range_enums_clang_16.patch
Normal file
75
depends/patches/boost/range_enums_clang_16.patch
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
diff --git a/include/boost/numeric/conversion/detail/int_float_mixture.hpp b/include/boost/numeric/conversion/detail/int_float_mixture.hpp
|
||||||
|
index 464e527..7690d07 100644
|
||||||
|
--- a/include/boost/numeric/conversion/detail/int_float_mixture.hpp
|
||||||
|
+++ b/include/boost/numeric/conversion/detail/int_float_mixture.hpp
|
||||||
|
@@ -16,15 +16,15 @@
|
||||||
|
#include "boost/numeric/conversion/int_float_mixture_enum.hpp"
|
||||||
|
#include "boost/numeric/conversion/detail/meta.hpp"
|
||||||
|
|
||||||
|
-#include "boost/mpl/integral_c.hpp"
|
||||||
|
+#include "boost/type_traits/integral_constant.hpp"
|
||||||
|
|
||||||
|
namespace boost { namespace numeric { namespace convdetail
|
||||||
|
{
|
||||||
|
// Integral Constants for 'IntFloatMixture'
|
||||||
|
- typedef mpl::integral_c<int_float_mixture_enum, integral_to_integral> int2int_c ;
|
||||||
|
- typedef mpl::integral_c<int_float_mixture_enum, integral_to_float> int2float_c ;
|
||||||
|
- typedef mpl::integral_c<int_float_mixture_enum, float_to_integral> float2int_c ;
|
||||||
|
- typedef mpl::integral_c<int_float_mixture_enum, float_to_float> float2float_c ;
|
||||||
|
+ typedef boost::integral_constant<int_float_mixture_enum, integral_to_integral> int2int_c ;
|
||||||
|
+ typedef boost::integral_constant<int_float_mixture_enum, integral_to_float> int2float_c ;
|
||||||
|
+ typedef boost::integral_constant<int_float_mixture_enum, float_to_integral> float2int_c ;
|
||||||
|
+ typedef boost::integral_constant<int_float_mixture_enum, float_to_float> float2float_c ;
|
||||||
|
|
||||||
|
// Metafunction:
|
||||||
|
//
|
||||||
|
diff --git a/include/boost/numeric/conversion/detail/sign_mixture.hpp b/include/boost/numeric/conversion/detail/sign_mixture.hpp
|
||||||
|
index c7f9e42..fde1584 100644
|
||||||
|
--- a/include/boost/numeric/conversion/detail/sign_mixture.hpp
|
||||||
|
+++ b/include/boost/numeric/conversion/detail/sign_mixture.hpp
|
||||||
|
@@ -16,15 +16,15 @@
|
||||||
|
#include "boost/numeric/conversion/sign_mixture_enum.hpp"
|
||||||
|
#include "boost/numeric/conversion/detail/meta.hpp"
|
||||||
|
|
||||||
|
-#include "boost/mpl/integral_c.hpp"
|
||||||
|
+#include "boost/type_traits/integral_constant.hpp"
|
||||||
|
|
||||||
|
namespace boost { namespace numeric { namespace convdetail
|
||||||
|
{
|
||||||
|
// Integral Constants for 'SignMixture'
|
||||||
|
- typedef mpl::integral_c<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ;
|
||||||
|
- typedef mpl::integral_c<sign_mixture_enum, signed_to_signed> sig2sig_c ;
|
||||||
|
- typedef mpl::integral_c<sign_mixture_enum, signed_to_unsigned> sig2unsig_c ;
|
||||||
|
- typedef mpl::integral_c<sign_mixture_enum, unsigned_to_signed> unsig2sig_c ;
|
||||||
|
+ typedef boost::integral_constant<sign_mixture_enum, unsigned_to_unsigned> unsig2unsig_c ;
|
||||||
|
+ typedef boost::integral_constant<sign_mixture_enum, signed_to_signed> sig2sig_c ;
|
||||||
|
+ typedef boost::integral_constant<sign_mixture_enum, signed_to_unsigned> sig2unsig_c ;
|
||||||
|
+ typedef boost::integral_constant<sign_mixture_enum, unsigned_to_signed> unsig2sig_c ;
|
||||||
|
|
||||||
|
// Metafunction:
|
||||||
|
//
|
||||||
|
diff --git a/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp b/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
|
||||||
|
index 36dbc49..a39d29f 100644
|
||||||
|
--- a/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
|
||||||
|
+++ b/include/boost/numeric/conversion/detail/udt_builtin_mixture.hpp
|
||||||
|
@@ -15,15 +15,15 @@
|
||||||
|
#include "boost/numeric/conversion/udt_builtin_mixture_enum.hpp"
|
||||||
|
#include "boost/numeric/conversion/detail/meta.hpp"
|
||||||
|
|
||||||
|
-#include "boost/mpl/integral_c.hpp"
|
||||||
|
+#include "boost/type_traits/integral_constant.hpp"
|
||||||
|
|
||||||
|
namespace boost { namespace numeric { namespace convdetail
|
||||||
|
{
|
||||||
|
// Integral Constants for 'UdtMixture'
|
||||||
|
- typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
|
||||||
|
- typedef mpl::integral_c<udt_builtin_mixture_enum, builtin_to_udt> builtin2udt_c ;
|
||||||
|
- typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_builtin> udt2builtin_c ;
|
||||||
|
- typedef mpl::integral_c<udt_builtin_mixture_enum, udt_to_udt> udt2udt_c ;
|
||||||
|
+ typedef boost::integral_constant<udt_builtin_mixture_enum, builtin_to_builtin> builtin2builtin_c ;
|
||||||
|
+ typedef boost::integral_constant<udt_builtin_mixture_enum, builtin_to_udt> builtin2udt_c ;
|
||||||
|
+ typedef boost::integral_constant<udt_builtin_mixture_enum, udt_to_builtin> udt2builtin_c ;
|
||||||
|
+ typedef boost::integral_constant<udt_builtin_mixture_enum, udt_to_udt> udt2udt_c ;
|
||||||
|
|
||||||
|
// Metafunction:
|
||||||
|
//
|
||||||
@@ -4,7 +4,7 @@ CC_DARWIN = g++-8
|
|||||||
CC_WIN = x86_64-w64-mingw32-gcc-posix
|
CC_WIN = x86_64-w64-mingw32-gcc-posix
|
||||||
CC_AARCH64 = aarch64-linux-gnu-g++
|
CC_AARCH64 = aarch64-linux-gnu-g++
|
||||||
CFLAGS_DARWIN = -DBUILD_CUSTOMCC -std=c++11 -arch x86_64 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../leveldb/include -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib
|
CFLAGS_DARWIN = -DBUILD_CUSTOMCC -std=c++11 -arch x86_64 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../leveldb/include -I.. -I. -fPIC -Wl,-undefined -Wl,dynamic_lookup -Wno-write-strings -shared -dynamiclib
|
||||||
CFLAGS = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../leveldb/include -I.. -I. -fPIC -shared
|
CFLAGS = -D_HAS_AUTO_PTR_ETC=0 -DBOOST_NO_CXX98_FUNCTION_BASE -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/$(shell echo `../..//depends/config.guess`/include) -I../univalue/include -I../leveldb/include -I.. -I. -fPIC -shared
|
||||||
CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/x86_64-w64-mingw32/include -I../univalue/include -I../leveldb/include -I.. -I. -fPIC -shared
|
CFLAGS_WIN = -Wno-write-strings -DBUILD_CUSTOMCC -std=c++11 -I../secp256k1/include -I../../depends/x86_64-w64-mingw32/include -I../univalue/include -I../leveldb/include -I.. -I. -fPIC -shared
|
||||||
DEBUGFLAGS = -O0 -D _DEBUG
|
DEBUGFLAGS = -O0 -D _DEBUG
|
||||||
RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program
|
RELEASEFLAGS = -O2 -D NDEBUG -combine -fwhole-program
|
||||||
|
|||||||
Reference in New Issue
Block a user