commit: 5e3406541f08d5d69ab6eee06f0978d6cd840fa5 Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> AuthorDate: Tue Jul 6 00:39:57 2021 +0000 Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> CommitDate: Tue Jul 6 01:15:20 2021 +0000 URL: https://gitweb.gentoo.org/proj/genkernel.git/commit/?id=5e340654
Bump boost to v1.76.0 Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> gkbuilds/boost-build.gkbuild | 20 +--- gkbuilds/boost.gkbuild | 10 +- .../boost-build-1.71.0-respect-c_ld-flags.patch | 9 -- .../boost-build-1.71.0-disable_python_rpath.patch | 0 ...ost-build-1.73.0-add-none-feature-options.patch | 0 ...oost-build-1.74.0-no-implicit-march-flags.patch | 0 .../1.76.0/boost-build-1.76.0-python-numpy.patch | 24 ++++ .../boost-build-1.76.0-respect-user-flags.patch | 11 ++ .../1.75.0/boost-1.73-property-tree-include.patch | 45 -------- .../boost-1.71.0-context-x32.patch | 0 .../boost-1.71.0-disable_icu_rpath.patch | 0 .../boost-1.73-boost-mpi-python-PEP-328.patch | 17 +++ .../boost/1.76.0/boost-1.74-CVE-2012-2677.patch | 125 +++++++++++++++++++++ patches/boost/1.76.0/boost-1.76-boost-numpy.patch | 23 ++++ patches/boost/1.76.0/boost-1.76-sparc-define.patch | 21 ++++ 15 files changed, 234 insertions(+), 71 deletions(-) diff --git a/gkbuilds/boost-build.gkbuild b/gkbuilds/boost-build.gkbuild index baf1811..5d470c1 100644 --- a/gkbuilds/boost-build.gkbuild +++ b/gkbuilds/boost-build.gkbuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 2019-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # distcc is known to fail compiling boost and will fallback @@ -9,31 +9,19 @@ MY_PV="${PV//./_}" S="${WORKDIR}/boost_${MY_PV}/tools/build/src" QA_IGNORE_DYNAMICALLY_LINKED_PROGRAM='(bjam|b2)$' -src_prepare() { - default - - # remove default -march/-mcpu definitions - # bjam is trying to be clever and injects -march= in order to - # optimize code for you. This breaks on 32-bit builds, because - # -march=i686 will not work on an i486 CHOST. - # https://bugs.gentoo.org/624616 - sed -e '/^cpu-flags\s*gcc\s*OPTIONS/d' \ - -e '/toolset\.flags\s*gcc\s*OPTIONS/d' \ - -e "/cpu_flags('gcc',\s*'OPTIONS'/d" \ - -i tools/gcc.{jam,py} || die "Failed removing -march/-mcpu" -} - src_compile() { cd engine || die "Failed to chdir to '${S}/engine'!" local myargs=( ./build.sh cxx + --cxx="$(tc-getCXX)" + --cxxflags="${CXXFLAGS}" -d+2 --without-python ) - CC=$(tc-getBUILD_CC) CXX=$(tc-getBUILD_CXX) gkexec "${myargs[*]}" + gkexec "${myargs[*]}" } src_install() { diff --git a/gkbuilds/boost.gkbuild b/gkbuilds/boost.gkbuild index a796e0f..9b7c1b5 100644 --- a/gkbuilds/boost.gkbuild +++ b/gkbuilds/boost.gkbuild @@ -1,4 +1,4 @@ -# Copyright 1999-2019 Gentoo Authors +# Copyright 2019-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 # distcc is known to fail compiling boost and will fallback @@ -18,6 +18,14 @@ create_user-config.jam() { cat > "${user_config_jam}" <<- __EOF__ || die using ${compiler} : ${compiler_version} : ${compiler_executable} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ; __EOF__ + + # Boost.Build does not allow for disabling of numpy + # extensions, thereby leading to automagic numpy + # https://github.com/boostorg/python/issues/111#issuecomment-280447482 + sed \ + -e 's/\[ unless \[ python\.numpy \] : <build>no \]/<build>no/g' \ + -i "${S}"/libs/python/build/Jamfile \ + || die } ejam() { diff --git a/patches/boost-build/1.75.0/boost-build-1.71.0-respect-c_ld-flags.patch b/patches/boost-build/1.75.0/boost-build-1.71.0-respect-c_ld-flags.patch deleted file mode 100644 index f51abea..0000000 --- a/patches/boost-build/1.75.0/boost-build-1.71.0-respect-c_ld-flags.patch +++ /dev/null @@ -1,9 +0,0 @@ ---- a/engine/build.sh -+++ b/engine/build.sh -@@ -439,5 +439,5 @@ - if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}" - else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG" - fi --echo_run ${B2_CXX} ${CXXFLAGS} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2 -+echo_run ${B2_CXX} ${CPPFLAGS} ${CXXFLAGS} ${LDFLAGS} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2 - echo_run cp b2 bjam diff --git a/patches/boost-build/1.75.0/boost-build-1.71.0-disable_python_rpath.patch b/patches/boost-build/1.76.0/boost-build-1.71.0-disable_python_rpath.patch similarity index 100% rename from patches/boost-build/1.75.0/boost-build-1.71.0-disable_python_rpath.patch rename to patches/boost-build/1.76.0/boost-build-1.71.0-disable_python_rpath.patch diff --git a/patches/boost-build/1.75.0/boost-build-1.73.0-add-none-feature-options.patch b/patches/boost-build/1.76.0/boost-build-1.73.0-add-none-feature-options.patch similarity index 100% rename from patches/boost-build/1.75.0/boost-build-1.73.0-add-none-feature-options.patch rename to patches/boost-build/1.76.0/boost-build-1.73.0-add-none-feature-options.patch diff --git a/patches/boost-build/1.75.0/boost-build-1.74.0-no-implicit-march-flags.patch b/patches/boost-build/1.76.0/boost-build-1.74.0-no-implicit-march-flags.patch similarity index 100% rename from patches/boost-build/1.75.0/boost-build-1.74.0-no-implicit-march-flags.patch rename to patches/boost-build/1.76.0/boost-build-1.74.0-no-implicit-march-flags.patch diff --git a/patches/boost-build/1.76.0/boost-build-1.76.0-python-numpy.patch b/patches/boost-build/1.76.0/boost-build-1.76.0-python-numpy.patch new file mode 100644 index 0000000..ed04d54 --- /dev/null +++ b/patches/boost-build/1.76.0/boost-build-1.76.0-python-numpy.patch @@ -0,0 +1,24 @@ +From 61adb508853be1fa2c01a0c3a0c55fbd16cb9a52 Mon Sep 17 00:00:00 2001 +From: Peter Dimov <pdi...@gmail.com> +Date: Mon, 24 May 2021 22:11:23 +0300 +Subject: [PATCH] Declare the /python//numpy target to hold the include path + (fixes #725) + +--- + tools/python.jam | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/tools/python.jam b/tools/python.jam +index 00706932d2..0dfc750a22 100644 +--- a/tools/python.jam ++++ b/tools/python.jam +@@ -1052,6 +1052,9 @@ local rule configure ( version ? : cmd-or-prefix ? : includes * : libraries ? : + ; + } + ++ # Declare the numpy target, which contains the NumPy include directory ++ ++ alias numpy : : $(target-requirements) : : <include>$(.numpy-include) ; + } + + # Conditional rule specification that will prevent building of a target diff --git a/patches/boost-build/1.76.0/boost-build-1.76.0-respect-user-flags.patch b/patches/boost-build/1.76.0/boost-build-1.76.0-respect-user-flags.patch new file mode 100644 index 0000000..2289e70 --- /dev/null +++ b/patches/boost-build/1.76.0/boost-build-1.76.0-respect-user-flags.patch @@ -0,0 +1,11 @@ +--- a/engine/build.sh ++++ b/engine/build.sh +@@ -496,7 +496,7 @@ + if test_true ${B2_DEBUG_OPT} ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}" + else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG" + fi +- ( B2_VERBOSE_OPT=${TRUE} echo_run ${B2_CXX} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2 ) ++ ( B2_VERBOSE_OPT=${TRUE} echo_run ${B2_CXX} ${CPPFLAGS} ${B2_CXXFLAGS} ${LDFLAGS} ${B2_SOURCES} -o b2 ) + ( B2_VERBOSE_OPT=${TRUE} echo_run cp b2 bjam ) + } + diff --git a/patches/boost/1.75.0/boost-1.73-property-tree-include.patch b/patches/boost/1.75.0/boost-1.73-property-tree-include.patch deleted file mode 100644 index 5393882..0000000 --- a/patches/boost/1.75.0/boost-1.73-property-tree-include.patch +++ /dev/null @@ -1,45 +0,0 @@ -From d1c8825a45a0717e1ad79583d3283b0e5e32831e Mon Sep 17 00:00:00 2001 -From: Andrey Semashev <lasti...@users.noreply.github.com> -Date: Tue, 28 Apr 2020 22:03:04 +0300 -Subject: [PATCH] Fix usage of deprecated Boost.Bind features - -This fixes deprecation warnings generated by boost/bind.hpp. - -Also, use a more actual include path for ref.hpp. ---- - boost/property_tree/json_parser/detail/parser.hpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/boost/property_tree/json_parser/detail/parser.hpp b/boost/property_tree/json_parser/detail/parser.hpp -index 5554990fb..6cf636394 100644 ---- a/boost/property_tree/json_parser/detail/parser.hpp -+++ b/boost/property_tree/json_parser/detail/parser.hpp -@@ -3,8 +3,8 @@ - - #include <boost/property_tree/json_parser/error.hpp> - --#include <boost/ref.hpp> --#include <boost/bind.hpp> -+#include <boost/core/ref.hpp> -+#include <boost/bind/bind.hpp> - #include <boost/format.hpp> - - #include <iterator> -@@ -214,7 +214,7 @@ namespace boost { namespace property_tree { - void process_codepoint(Sentinel end, EncodingErrorFn error_fn) { - encoding.transcode_codepoint(cur, end, - boost::bind(&Callbacks::on_code_unit, -- boost::ref(callbacks), _1), -+ boost::ref(callbacks), boost::placeholders::_1), - error_fn); - } - -@@ -517,7 +517,7 @@ namespace boost { namespace property_tree { - void feed(unsigned codepoint) { - encoding.feed_codepoint(codepoint, - boost::bind(&Callbacks::on_code_unit, -- boost::ref(callbacks), _1)); -+ boost::ref(callbacks), boost::placeholders::_1)); - } - - Callbacks& callbacks; diff --git a/patches/boost/1.75.0/boost-1.71.0-context-x32.patch b/patches/boost/1.76.0/boost-1.71.0-context-x32.patch similarity index 100% rename from patches/boost/1.75.0/boost-1.71.0-context-x32.patch rename to patches/boost/1.76.0/boost-1.71.0-context-x32.patch diff --git a/patches/boost/1.75.0/boost-1.71.0-disable_icu_rpath.patch b/patches/boost/1.76.0/boost-1.71.0-disable_icu_rpath.patch similarity index 100% rename from patches/boost/1.75.0/boost-1.71.0-disable_icu_rpath.patch rename to patches/boost/1.76.0/boost-1.71.0-disable_icu_rpath.patch diff --git a/patches/boost/1.76.0/boost-1.73-boost-mpi-python-PEP-328.patch b/patches/boost/1.76.0/boost-1.73-boost-mpi-python-PEP-328.patch new file mode 100644 index 0000000..444db2b --- /dev/null +++ b/patches/boost/1.76.0/boost-1.73-boost-mpi-python-PEP-328.patch @@ -0,0 +1,17 @@ +--- a/libs/mpi/build/__init__.py ++++ b/libs/mpi/build/__init__.py +@@ -1,10 +1,12 @@ ++from __future__ import absolute_import ++ + import sys + if sys.platform == 'linux2': + import DLFCN as dl + flags = sys.getdlopenflags() + sys.setdlopenflags(dl.RTLD_NOW|dl.RTLD_GLOBAL) +- import mpi ++ from . import mpi + sys.setdlopenflags(flags) + else: +- import mpi ++ from . import mpi + diff --git a/patches/boost/1.76.0/boost-1.74-CVE-2012-2677.patch b/patches/boost/1.76.0/boost-1.74-CVE-2012-2677.patch new file mode 100644 index 0000000..ff947f7 --- /dev/null +++ b/patches/boost/1.76.0/boost-1.74-CVE-2012-2677.patch @@ -0,0 +1,125 @@ +https://src.fedoraproject.org/rpms/boost/raw/master/f/boost-1.58.0-pool.patch +https://bugzilla.redhat.com/show_bug.cgi?id=828856 +https://bugs.gentoo.org/620468 +https://svn.boost.org/trac10/ticket/6701 + +Index: boost/pool/pool.hpp +=================================================================== +--- a/boost/pool/pool.hpp (revision 78317) ++++ b/boost/pool/pool.hpp (revision 78326) +@@ -27,4 +27,6 @@ + #include <boost/pool/poolfwd.hpp> + ++// std::numeric_limits ++#include <boost/limits.hpp> + // boost::integer::static_lcm + #include <boost/integer/common_factor_ct.hpp> +@@ -358,4 +360,11 @@ + } + ++ size_type max_chunks() const ++ { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool. ++ size_type partition_size = alloc_size(); ++ size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type); ++ return (std::numeric_limits<size_type>::max() - POD_size) / alloc_size(); ++ } ++ + static void * & nextof(void * const ptr) + { //! \returns Pointer dereferenced. +@@ -377,5 +388,7 @@ + //! the first time that object needs to allocate system memory. + //! The default is 32. This parameter may not be 0. +- //! \param nmax_size is the maximum number of chunks to allocate in one block. ++ //! \param nmax_size is the maximum number of chunks to allocate in one block. ++ set_next_size(nnext_size); ++ set_max_size(nmax_size); + } + +@@ -400,7 +413,7 @@ + } + void set_next_size(const size_type nnext_size) +- { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0. +- //! \returns nnext_size. +- next_size = start_size = nnext_size; ++ { //! Set number of chunks to request from the system the next time that object needs to allocate system memory. This value should never be set to 0. ++ BOOST_USING_STD_MIN(); ++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks()); + } + size_type get_max_size() const +@@ -410,5 +423,6 @@ + void set_max_size(const size_type nmax_size) + { //! Set max_size. +- max_size = nmax_size; ++ BOOST_USING_STD_MIN(); ++ max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks()); + } + size_type get_requested_size() const +@@ -713,7 +727,7 @@ + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // initialize it, +@@ -753,7 +767,7 @@ + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // initialize it, +@@ -797,4 +811,6 @@ + //! \returns Address of chunk n if allocated ok. + //! \returns 0 if not enough memory for n chunks. ++ if (n > max_chunks()) ++ return 0; + + const size_type partition_size = alloc_size(); +@@ -845,7 +861,7 @@ + BOOST_USING_STD_MIN(); + if(!max_size) +- next_size <<= 1; ++ set_next_size(next_size << 1); + else if( next_size*partition_size/requested_size < max_size) +- next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); ++ set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); + + // insert it into the list, +Index: libs/pool/test/test_bug_6701.cpp +=================================================================== +--- a/libs/pool/test/test_bug_6701.cpp (revision 78326) ++++ b/libs/pool/test/test_bug_6701.cpp (revision 78326) +@@ -0,0 +1,27 @@ ++/* Copyright (C) 2012 Étienne Dupuis ++* ++* Use, modification and distribution is subject to the ++* Boost Software License, Version 1.0. (See accompanying ++* file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt) ++*/ ++ ++// Test of bug #6701 (https://svn.boost.org/trac/boost/ticket/6701) ++ ++#include <boost/pool/object_pool.hpp> ++#include <boost/limits.hpp> ++ ++int main() ++{ ++ boost::pool<> p(1024, std::numeric_limits<size_t>::max() / 768); ++ ++ void *x = p.malloc(); ++ BOOST_ASSERT(!x); ++ ++ BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_next_size()); ++ BOOST_ASSERT(std::numeric_limits<size_t>::max() / 1024 >= p.get_max_size()); ++ ++ void *y = p.ordered_malloc(std::numeric_limits<size_t>::max() / 768); ++ BOOST_ASSERT(!y); ++ ++ return 0; ++} diff --git a/patches/boost/1.76.0/boost-1.76-boost-numpy.patch b/patches/boost/1.76.0/boost-1.76-boost-numpy.patch new file mode 100644 index 0000000..d9af132 --- /dev/null +++ b/patches/boost/1.76.0/boost-1.76-boost-numpy.patch @@ -0,0 +1,23 @@ +From 0796305c863804a2b31610507c531da5c0408422 Mon Sep 17 00:00:00 2001 +From: Peter Dimov <pdi...@gmail.com> +Date: Mon, 24 May 2021 22:14:55 +0300 +Subject: [PATCH] Use the /python//numpy target instead of [ numpy.include ] + (fixes #361) + +--- + libs/python/build/Jamfile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libs/python/build/Jamfile b/libs/python/build/Jamfile +index dbc9fb203..03b69a25d 100644 +--- a/libs/python/build/Jamfile ++++ b/libs/python/build/Jamfile +@@ -117,7 +117,7 @@ lib boost_numpy + <define>BOOST_NUMPY_SOURCE + [ cond [ python.numpy ] : <library>/python//python_for_extensions ] + [ unless [ python.numpy ] : <build>no ] +- <include>$(numpy-include) ++ <library>/python//numpy + <library>boost_python + <python-debugging>on:<define>BOOST_DEBUG_PYTHON + -<tag>@$(BOOST_JAMROOT_MODULE)%$(BOOST_JAMROOT_MODULE).tag diff --git a/patches/boost/1.76.0/boost-1.76-sparc-define.patch b/patches/boost/1.76.0/boost-1.76-sparc-define.patch new file mode 100644 index 0000000..b3909ee --- /dev/null +++ b/patches/boost/1.76.0/boost-1.76-sparc-define.patch @@ -0,0 +1,21 @@ +https://github.com/boostorg/predef/commit/1be0e4a2d8db15a405f64a6f65507b87c1be7e1a.patch + +From 1be0e4a2d8db15a405f64a6f65507b87c1be7e1a Mon Sep 17 00:00:00 2001 +From: tkoecker <tkoec...@gmx.net> +Date: Fri, 21 May 2021 16:31:11 +0200 +Subject: [PATCH] added missing brackets (#118) +--- a/boost/predef/architecture/sparc.h ++++ b/boost/predef/architecture/sparc.h +@@ -34,10 +34,10 @@ Distributed under the Boost Software License, Version 1.0. + + #if defined(__sparc__) || defined(__sparc) + # undef BOOST_ARCH_SPARC +-# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__) ++# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv9) || defined(__sparc_v9__)) + # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(9,0,0) + # endif +-# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__) ++# if !defined(BOOST_ARCH_SPARC) && (defined(__sparcv8) || defined(__sparc_v8__)) + # define BOOST_ARCH_SPARC BOOST_VERSION_NUMBER(8,0,0) + # endif + # if !defined(BOOST_ARCH_SPARC)