include $(TOPDIR)/rules.mk
PKG_NAME:=boost
-PKG_VERSION:=1.70.0
-PKG_SOURCE_VERSION:=1_70_0
-PKG_RELEASE:=7
+PKG_VERSION:=1.71.0
+PKG_SOURCE_VERSION:=1_71_0
+PKG_RELEASE:=1
PKG_SOURCE:=$(PKG_NAME)_$(PKG_SOURCE_VERSION).tar.bz2
PKG_SOURCE_URL:=@SF/$(PKG_NAME)/$(PKG_NAME)/$(PKG_VERSION) https://dl.bintray.com/boostorg/release/$(PKG_VERSION)/source/
-PKG_HASH:=430ae8354789de4fd19ee52f3b1f739e1fba576f0aded0897c3c2bc00fb38778
+PKG_HASH:=d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee
PKG_MAINTAINER:=Carlos M. Ferreira <carlosmf.pt@gmail.com>
PKG_LICENSE:=BSL-1.0
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_NAME)_$(PKG_SOURCE_VERSION)
+HOST_BUILD_PARALLEL:=1
PKG_BUILD_PARALLEL:=1
PKG_USE_MIPS16:=0
endef
define Package/boost/description
-This package provides the Boost v1.70.0 libraries.
+This package provides the Boost v1.71.0 libraries.
Boost is a set of free, peer-reviewed, portable C++ source libraries.
------------------------------------------------------------------------------
-| Warning |
-| In order to build all of the Boost Libraries, it is necessary |
-| to use, at least, GCC version 5 (C++14 support) and, it is necessary to |
-| compile the kernel with Full Language Support. |
-| Without these requirerements, the following libs will not be available: |
-| - Boost.Locale |
-| - Boost.Coroutine2 (header-only library - requires C++11) |
-| - Boost.Fiber (requires C++14) |
------------------------------------------------------------------------------
-
This package provides the following run-time libraries:
- atomic
- chrono
- container
- context
- contract
- - coroutine (Deprecated - use Coroutine2)
- - - coroutine2 (Requires GCC v5 and up)
+ - coroutine and coroutine2 (Coroutine is deprecated - use Coroutine2)
- date_time
- exception
- filesystem
- - fiber (Requires GCC v5 and up)
+ - fiber
- graph
- - graph-parallel
- iostreams
- wave
There are many more header-only libraries supported by Boost.
-See more at http://www.boost.org/doc/libs/1_70_0/
+See more at http://www.boost.org/doc/libs/1_71_0/
endef
PKG_BUILD_DEPENDS:=boost/host PACKAGE_python:python PACKAGE_python3:python3
endef
define Package/boost/config
+ # Invisible config dependency
+ config boost-context-exclude
+ bool
+ default y if (mips64 || arc || arc700)
+ default n
+
+ config boost-coroutine-exclude
+ bool
+ default y if boost-context-exclude
+ default n
+
+ config boost-fiber-exclude
+ bool
+ default y if (TARGET_brcm47xx_generic || TARGET_brcm47xx_legacy || mips32 || mips64 || boost-coroutine-exclude)
+ default n
+
menu "Select Boost Options"
depends on PACKAGE_boost
comment "Boost compilation options."
bool "Shared"
config boost-runtime-static
- depends on !boost-shared-libs&&!boost-static-and-shared-libs
+ depends on (!boost-shared-libs && !boost-static-and-shared-libs)
bool "Static"
config boost-runtime-static-and-shared
- depends on boost-use-name-tags&&!boost-shared-libs&&!boost-static-and-shared-libs
+ depends on (boost-use-name-tags && !boost-shared-libs && !boost-static-and-shared-libs)
bool "Both"
endchoice
default m if ALL
select PACKAGE_boost-libs
select boost-test-pkg
- select boost-coroutine2
select boost-graph-parallel
- # Invisible config dependency
- config boost-fiber-exclude
- bool
- default y if (CPU_TYPE=mips32 || CPU_TYPE=mips64)
-
config boost-test-pkg
bool "Boost test package."
default m if ALL
select PACKAGE_boost-test
- config boost-coroutine2
- depends on !GCC_VERSION_4_8
- bool "Boost couroutine2 support."
- select PACKAGE_boost-coroutine
- default n
-
config boost-graph-parallel
bool "Boost parallel graph support."
select PACKAGE_boost-graph
- default n
+ default m if ALL
$(foreach lib,$(BOOST_LIBS), \
config PACKAGE_boost-$(lib)
default m if ALL
$(if $(findstring locale,$(lib)),depends on BUILD_NLS,)\
$(if $(findstring python,$(lib)),depends on PACKAGE_$(lib),)\
- $(if $(findstring fiber,$(lib)),depends on (CPU_TYPE!=mips32 && CPU_TYPE!=mips64),)
+ $(if $(findstring fiber,$(lib)),depends on !boost-fiber-exclude,)\
+ $(if $(findstring context,$(lib)),depends on !boost-context-exclude,)
+ $(if $(findstring coroutine,$(lib)),depends on !boost-coroutine-exclude,)
)
endmenu
-
endef
PKG_CONFIG_DEPENDS:= CONFIG_PACKAGE_boost-test
endef
endef
-$(eval $(call DefineBoostLibrary,atomic,system,))
-$(eval $(call DefineBoostLibrary,chrono,system,))
-$(eval $(call DefineBoostLibrary,container,,))
-$(eval $(call DefineBoostLibrary,context,chrono system thread,))
-$(eval $(call DefineBoostLibrary,contract,system,))
-$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,))
-$(eval $(call DefineBoostLibrary,date_time,,))
+$(eval $(call DefineBoostLibrary,atomic,system))
+$(eval $(call DefineBoostLibrary,chrono,system))
+$(eval $(call DefineBoostLibrary,container))
+$(eval $(call DefineBoostLibrary,context,chrono system thread,,!boost-context-exclude))
+$(eval $(call DefineBoostLibrary,contract,system))
+$(eval $(call DefineBoostLibrary,coroutine,system chrono context thread,,!boost-coroutine-exclude))
+$(eval $(call DefineBoostLibrary,date_time))
#$(eval $(call DefineBoostLibrary,exception,,))
$(eval $(call DefineBoostLibrary,fiber,coroutine filesystem,,!boost-fiber-exclude))
-$(eval $(call DefineBoostLibrary,filesystem,system,))
-$(eval $(call DefineBoostLibrary,graph,regex,))
+$(eval $(call DefineBoostLibrary,filesystem,system))
+$(eval $(call DefineBoostLibrary,graph,regex))
$(eval $(call DefineBoostLibrary,iostreams,,+zlib +liblzma +libbz2 +zstd))
$(eval $(call DefineBoostLibrary,locale,system,$(ICONV_DEPENDS),BUILD_NLS))
-$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex,))
-$(eval $(call DefineBoostLibrary,math,,))
+$(eval $(call DefineBoostLibrary,log,system chrono date_time thread filesystem regex))
+$(eval $(call DefineBoostLibrary,math))
#$(eval $(call DefineBoostLibrary,mpi,,)) # OpenMPI does no exist in OpenWRT at this time.
-$(eval $(call DefineBoostLibrary,program_options,,))
+$(eval $(call DefineBoostLibrary,program_options))
$(eval $(call DefineBoostLibrary,python,,,PACKAGE_python))
$(eval $(call DefineBoostLibrary,python3,,,PACKAGE_python3))
-$(eval $(call DefineBoostLibrary,random,system,))
-$(eval $(call DefineBoostLibrary,regex,,))
-$(eval $(call DefineBoostLibrary,serialization,,))
-$(eval $(call DefineBoostLibrary,wserialization,serialization,))
-$(eval $(call DefineBoostLibrary,stacktrace,,))
-$(eval $(call DefineBoostLibrary,system,,))
-$(eval $(call DefineBoostLibrary,thread,system chrono atomic,))
+$(eval $(call DefineBoostLibrary,random,system))
+$(eval $(call DefineBoostLibrary,regex))
+$(eval $(call DefineBoostLibrary,serialization))
+$(eval $(call DefineBoostLibrary,wserialization,serialization))
+$(eval $(call DefineBoostLibrary,stacktrace))
+$(eval $(call DefineBoostLibrary,system))
+$(eval $(call DefineBoostLibrary,thread,system chrono atomic))
$(eval $(call DefineBoostLibrary,timer,chrono))
-$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread,))
-$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem,))
+$(eval $(call DefineBoostLibrary,type_erasure,chrono system thread))
+$(eval $(call DefineBoostLibrary,wave,date_time thread filesystem))
include $(INCLUDE_DIR)/host-build.mk
define Host/Install
$(INSTALL_DIR) $(STAGING_DIR_HOSTPKG)/bin
- $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/bin.*/b2 $(STAGING_DIR_HOSTPKG)/bin/
+ $(CP) $(HOST_BUILD_DIR)/tools/build/src/engine/b2 $(STAGING_DIR_HOSTPKG)/bin/
endef
define Package/boost/Default/install
--- /dev/null
+--- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
++++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
+@@ -23,11 +23,11 @@
+ #include <sys/stat.h>
+ #include <sys/types.h>
+ #include <fcntl.h>
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <asm/unistd.h>
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # include <sys/eventfd.h>
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ #include <boost/asio/detail/cstdint.hpp>
+ #include <boost/asio/detail/eventfd_select_interrupter.hpp>
+ #include <boost/asio/detail/throw_error.hpp>
+@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_sele
+
+ void eventfd_select_interrupter::open_descriptors()
+ {
+-#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
+ if (read_descriptor_ != -1)
+ {
+ ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+-#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+ # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
+ write_descriptor_ = read_descriptor_ =
+ ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
+@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_de
+ ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
+ }
+ }
+-#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
++#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
+
+ if (read_descriptor_ == -1)
+ {
--- /dev/null
+From 83b989ecee478be083db8dc0cc7a5387615bd3cb Mon Sep 17 00:00:00 2001
+From: Andrey Semashev <andrey.semashev@gmail.com>
+Date: Wed, 31 Jul 2019 16:28:05 +0300
+Subject: [PATCH] Added support for utimensat for better POSIX.1-2008
+ compliance.
+
+POSIX.1-2008 marks utime as obsolete and replaces it with utimensat.
+uClibc-ng has an option for removing utime, including the corresponding
+header.
+
+Closes https://github.com/boostorg/filesystem/pull/115.
+---
+ libs/filesystem/src/operations.cpp | 24 ++++++++++++++++++++++--
+ 1 file changed, 22 insertions(+), 2 deletions(-)
+
+diff --git a/src/operations.cpp b/src/operations.cpp
+index 9bba1cf7a..038109d35 100644
+--- a/libs/filesystem/src/operations.cpp
++++ b/libs/filesystem/src/operations.cpp
+@@ -62,7 +62,7 @@
+ #endif
+
+ #ifndef _POSIX_PTHREAD_SEMANTICS
+-# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r()needs this
++# define _POSIX_PTHREAD_SEMANTICS // Sun readdir_r() needs this
+ #endif
+
+ #include <boost/filesystem/operations.hpp>
+@@ -119,7 +119,9 @@ using std::wstring;
+ # include <dirent.h>
+ # include <unistd.h>
+ # include <fcntl.h>
+-# include <utime.h>
++# if _POSIX_C_SOURCE < 200809L
++# include <utime.h>
++# endif
+ # include "limits.h"
+
+ # else // BOOST_WINDOW_API
+@@ -1451,6 +1453,22 @@ namespace detail
+ system::error_code* ec)
+ {
+ # ifdef BOOST_POSIX_API
++# if _POSIX_C_SOURCE >= 200809L
++
++ struct timespec times[2] = {};
++
++ // Keep the last access time unchanged
++ times[0].tv_nsec = UTIME_OMIT;
++
++ times[1].tv_sec = new_time;
++
++ if (BOOST_UNLIKELY(::utimensat(AT_FDCWD, p.c_str(), times, 0) != 0))
++ {
++ error(BOOST_ERRNO, p, ec, "boost::filesystem::last_write_time");
++ return;
++ }
++
++# else // _POSIX_C_SOURCE >= 200809L
+
+ struct stat path_stat;
+ if (error(::stat(p.c_str(), &path_stat)!= 0,
+@@ -1462,6 +1480,8 @@ namespace detail
+ error(::utime(p.c_str(), &buf)!= 0 ? BOOST_ERRNO : 0,
+ p, ec, "boost::filesystem::last_write_time");
+
++# endif // _POSIX_C_SOURCE >= 200809L
++
+ # else
+
+ handle_wrapper hw(
+++ /dev/null
---- a/boost/asio/detail/impl/eventfd_select_interrupter.ipp
-+++ b/boost/asio/detail/impl/eventfd_select_interrupter.ipp
-@@ -23,11 +23,11 @@
- #include <sys/stat.h>
- #include <sys/types.h>
- #include <fcntl.h>
--#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- # include <asm/unistd.h>
--#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- # include <sys/eventfd.h>
--#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- #include <boost/asio/detail/cstdint.hpp>
- #include <boost/asio/detail/eventfd_select_interrupter.hpp>
- #include <boost/asio/detail/throw_error.hpp>
-@@ -46,14 +46,14 @@ eventfd_select_interrupter::eventfd_sele
-
- void eventfd_select_interrupter::open_descriptors()
- {
--#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#if __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- write_descriptor_ = read_descriptor_ = syscall(__NR_eventfd, 0);
- if (read_descriptor_ != -1)
- {
- ::fcntl(read_descriptor_, F_SETFL, O_NONBLOCK);
- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
- }
--#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#else // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
- # if defined(EFD_CLOEXEC) && defined(EFD_NONBLOCK)
- write_descriptor_ = read_descriptor_ =
- ::eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
-@@ -70,7 +70,7 @@ void eventfd_select_interrupter::open_de
- ::fcntl(read_descriptor_, F_SETFD, FD_CLOEXEC);
- }
- }
--#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 8
-+#endif // __GLIBC__ == 2 && __GLIBC_MINOR__ < 2
-
- if (read_descriptor_ == -1)
- {
+++ /dev/null
-From cbdb354a274c8ab51a15dd43eafd02c2b6a576f0 Mon Sep 17 00:00:00 2001
-From: Edward Catmur <edward.catmur@mavensecurities.com>
-Date: Wed, 17 Apr 2019 15:05:37 +0100
-Subject: [PATCH 1/2] Copy variant cvref when determining result type
-
-Ensures that we can e.g. call apply_visitor on a lvalue variant
----
- boost/variant/detail/apply_visitor_unary.hpp | 9 +++++----
- 1 file changed, 5 insertions(+), 4 deletions(-)
-
---- a/boost/variant/detail/apply_visitor_unary.hpp
-+++ b/boost/variant/detail/apply_visitor_unary.hpp
-@@ -23,6 +23,7 @@
- # include <boost/mpl/size.hpp>
- # include <boost/utility/declval.hpp>
- # include <boost/core/enable_if.hpp>
-+# include <boost/type_traits/copy_cv_ref.hpp>
- # include <boost/type_traits/remove_reference.hpp>
- # include <boost/variant/detail/has_result_type.hpp>
- #endif
-@@ -85,7 +86,7 @@ namespace detail { namespace variant {
- // This class serves only metaprogramming purposes. none of its methods must be called at runtime!
- template <class Visitor, class Variant>
- struct result_multideduce1 {
-- typedef typename Variant::types types;
-+ typedef typename remove_reference<Variant>::type::types types;
- typedef typename boost::mpl::begin<types>::type begin_it;
- typedef typename boost::mpl::advance<
- begin_it, boost::mpl::int_<boost::mpl::size<types>::type::value - 1>
-@@ -95,14 +96,14 @@ struct result_multideduce1 {
- struct deduce_impl {
- typedef typename boost::mpl::next<It>::type next_t;
- typedef typename boost::mpl::deref<It>::type value_t;
-- typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< value_t >() )
-+ typedef decltype(true ? boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )
- : boost::declval< typename deduce_impl<next_t>::type >()) type;
- };
-
- template <class Dummy>
- struct deduce_impl<last_it, Dummy> {
- typedef typename boost::mpl::deref<last_it>::type value_t;
-- typedef decltype(boost::declval< Visitor& >()( boost::declval< value_t >() )) type;
-+ typedef decltype(boost::declval< Visitor& >()( boost::declval< copy_cv_ref_t< value_t, Variant > >() )) type;
- };
-
- typedef typename deduce_impl<begin_it>::type type;
-@@ -132,7 +133,7 @@ inline decltype(auto) apply_visitor(Visi
- boost::detail::variant::has_result_type<Visitor>
- >::type* = 0)
- {
-- boost::detail::variant::result_wrapper1<Visitor, typename remove_reference<Visitable>::type> cpp14_vis(::boost::forward<Visitor>(visitor));
-+ boost::detail::variant::result_wrapper1<Visitor, Visitable> cpp14_vis(::boost::forward<Visitor>(visitor));
- return ::boost::forward<Visitable>(visitable).apply_visitor(cpp14_vis);
- }
-
---- a/libs/variant/test/const_ref_apply_visitor.cpp
-+++ b/libs/variant/test/const_ref_apply_visitor.cpp
-@@ -217,6 +217,44 @@ void test_cpp14_visitor(const variant_ty
- #endif
- }
-
-+void test_cpp14_visitor(variant_type& test_var)
-+{
-+ std::cout << "Testing lvalue visitable for c++14\n";
-+
-+ BOOST_TEST(boost::apply_visitor([](auto& v) { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
-+}
-+
-+void test_cpp14_mutable_visitor(variant_type& test_var)
-+{
-+ std::cout << "Testing lvalue visitable for c++14 with inline mutable lambda\n";
-+
-+ BOOST_TEST(boost::apply_visitor([](auto& v) mutable -> auto { return lvalue_rvalue_detector()(v); }, test_var) == "lvalue reference");
-+}
-+
-+void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2)
-+{
-+ std::cout << "Testing lvalue visitable for c++14\n";
-+
-+ BOOST_TEST(boost::apply_visitor([](auto& v, auto& vv) { return lvalue_rvalue_detector()(v, vv); }, test_var, test_var2)
-+ == "lvalue reference, lvalue reference");
-+}
-+
-+void test_cpp14_visitor(variant_type& test_var, variant_type& test_var2, variant_type& test_var3)
-+{
-+#if !defined(BOOST_VARIANT_DO_NOT_USE_VARIADIC_TEMPLATES) && !defined(BOOST_NO_CXX11_HDR_TUPLE)
-+ std::cout << "Testing lvalue visitable for c++14\n";
-+
-+ auto result = boost::apply_visitor([](auto& v, auto& t, auto& p) { return lvalue_rvalue_detector()(v, t, p); },
-+ test_var, test_var2, test_var3);
-+ std::cout << "result: " << result << std::endl;
-+ BOOST_TEST(result == "lvalue reference, lvalue reference, lvalue reference");
-+#else
-+ (void)test_var;
-+ (void)test_var2;
-+ (void)test_var3;
-+#endif
-+}
-+
- void test_cpp14_visitor(variant_type&& test_var)
- {
- std::cout << "Testing rvalue visitable for c++14\n";
-@@ -333,8 +371,14 @@ void run_cpp14_mixed_tests()
- void run_cpp14_tests()
- {
- #ifndef BOOST_NO_CXX14_DECLTYPE_AUTO
-+ variant_type const c1(10), c2(20), c3(30);
- variant_type v1(10), v2(20), v3(30);
-
-+ test_cpp14_visitor(c1);
-+ test_cpp14_mutable_visitor(c1);
-+ test_cpp14_visitor(c2, c3);
-+ test_cpp14_visitor(c1, c2, c3);
-+
- test_cpp14_visitor(v1);
- test_cpp14_mutable_visitor(v1);
- test_cpp14_visitor(v2, v3);
--- /dev/null
+--- a/boost/math/tools/roots.hpp
++++ b/boost/math/tools/roots.hpp
+@@ -665,8 +665,8 @@ namespace detail
+ inline T discriminant(T const & a, T const & b, T const & c)
+ {
+ T w = 4*a*c;
+- T e = std::fma(-c, 4*a, w);
+- T f = std::fma(b, b, -w);
++ T e = fma(-c, 4*a, w);
++ T f = fma(b, b, -w);
+ return f + e;
+ }
+ }
+@@ -674,7 +674,6 @@ namespace detail
+ template<class T>
+ auto quadratic_roots(T const& a, T const& b, T const& c)
+ {
+- using std::copysign;
+ using std::sqrt;
+ if constexpr (std::is_integral<T>::value)
+ {
+++ /dev/null
---- a/boost/math/tools/roots.hpp
-+++ b/boost/math/tools/roots.hpp
-@@ -665,8 +665,8 @@ namespace detail
- inline T discriminant(T const & a, T const & b, T const & c)
- {
- T w = 4*a*c;
-- T e = std::fma(-c, 4*a, w);
-- T f = std::fma(b, b, -w);
-+ T e = fma(-c, 4*a, w);
-+ T f = fma(b, b, -w);
- return f + e;
- }
- }
-@@ -674,7 +674,6 @@ namespace detail
- template<class T>
- auto quadratic_roots(T const& a, T const& b, T const& c)
- {
-- using std::copysign;
- using std::sqrt;
- if constexpr (std::is_integral<T>::value)
- {