Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -1458,6 +1458,12 @@ AX_BOOST_BASE([1.64.0],[],[AC_MSG_ERROR([Boost is not available!])])
if test x$want_boost = xno; then
AC_MSG_ERROR([[only libdashconsensus can be built without boost]])
fi

dnl Prevent use of std::unary_function, which was removed in C++17,
dnl and will generate warnings with newer compilers.
dnl See: https://github.com/boostorg/container_hash/issues/22.
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"

AX_BOOST_FILESYSTEM

dnl Opt-in to Boost Process
Expand All @@ -1471,11 +1477,6 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <boost/process.hpp>]],
fi

if test x$suppress_external_warnings != xno; then
dnl Prevent use of std::unary_function, which was removed in C++17,
dnl and will generate warnings with newer compilers.
dnl See: https://github.com/boostorg/container_hash/issues/22.
BOOST_CPPFLAGS="$BOOST_CPPFLAGS -DBOOST_NO_CXX98_FUNCTION_BASE"

BOOST_CPPFLAGS=SUPPRESS_WARNINGS($BOOST_CPPFLAGS)
fi

Expand Down
1 change: 1 addition & 0 deletions depends/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ PATCHES_PATH = $(BASEDIR)/patches
BASEDIR = $(CURDIR)
HASH_LENGTH:=11
DOWNLOAD_CONNECT_TIMEOUT:=30
DOWNLOAD_RETRIES:=3
HOST_ID_SALT ?= salt
BUILD_ID_SALT ?= salt

Expand Down
2 changes: 1 addition & 1 deletion depends/builders/darwin.mk
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ build_darwin_OTOOL:=$(shell xcrun -f otool)
build_darwin_NM:=$(shell xcrun -f nm)
build_darwin_INSTALL_NAME_TOOL:=$(shell xcrun -f install_name_tool)
build_darwin_SHA256SUM=shasum -a 256
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o
build_darwin_DOWNLOAD=curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o

#darwin host on darwin builder. overrides darwin host preferences.
darwin_CC=$(shell xcrun -f clang) -mmacosx-version-min=$(OSX_MIN_VERSION) -isysroot$(shell xcrun --show-sdk-path)
Expand Down
2 changes: 1 addition & 1 deletion depends/builders/linux.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
build_linux_SHA256SUM = sha256sum
build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) -o
build_linux_DOWNLOAD = curl --location --fail --connect-timeout $(DOWNLOAD_CONNECT_TIMEOUT) --retry $(DOWNLOAD_RETRIES) -o
2 changes: 0 additions & 2 deletions depends/funcs.mk
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ endef
define fetch_file
( test -f $$($(1)_source_dir)/$(4) || \
( $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5)) || \
(sleep 5 && $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))) || \
(sleep 10 && $(call fetch_file_inner,$(1),$(2),$(3),$(4),$(5))) || \
$(call fetch_file_inner,$(1),$(FALLBACK_DOWNLOAD_PATH),$(3),$(4),$(5))))
endef

Expand Down
8 changes: 1 addition & 7 deletions depends/packages/boost.mk
Original file line number Diff line number Diff line change
Expand Up @@ -21,27 +21,21 @@ $(package)_config_opts_i686_android=address-model=32
$(package)_config_opts_aarch64_android=address-model=64
$(package)_config_opts_x86_64_android=address-model=64
$(package)_config_opts_armv7a_android=address-model=32
unary_function=unary_function
ifneq (,$(findstring clang,$($(package)_cxx)))
$(package)_toolset_$(host_os)=clang
ifeq ($(build_os),darwin)
unary_function=__unary_function
endif
else
$(package)_toolset_$(host_os)=gcc
endif
$(package)_config_libraries=filesystem,test
$(package)_cxxflags=-std=c++17
$(package)_cxxflags=-std=c++11
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

could you add TODO here so far as it is not permanent change?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant TODO right here, so, next release we can re-evaluate it if it is still necessary or can be removed, but I guess you should not forget it yourself :D

$(package)_cxxflags_linux=-fPIC
$(package)_cxxflags_freebsd=-fPIC
$(package)_cxxflags_openbsd=-fPIC
$(package)_cxxflags_android=-fPIC
$(package)_cxxflags_x86_64=-fcf-protection=full
endef

# Fix missing unary_function in clang15 on macos, can be removed after upgrading to 1.81
define $(package)_preprocess_cmds
sed -i.old "s/unary_function/$(unary_function)/" boost/container_hash/hash.hpp && \
echo "using $($(package)_toolset_$(host_os)) : : $($(package)_cxx) : <cflags>\"$($(package)_cflags)\" <cxxflags>\"$($(package)_cxxflags)\" <compileflags>\"$($(package)_cppflags)\" <linkflags>\"$($(package)_ldflags)\" <archiver>\"$($(package)_ar)\" <striper>\"$(host_STRIP)\" <ranlib>\"$(host_RANLIB)\" <rc>\"$(host_WINDRES)\" : ;" > user-config.jam
endef

Expand Down