diff options
| author | Alexander Kanavin <alex.kanavin@gmail.com> | 2022-08-19 09:26:56 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2022-08-21 22:51:42 +0100 |
| commit | 07322357f7cef3eb199390ae3b599d75d95c8ebf (patch) | |
| tree | 9b64ebc9bb4d1b6f055fd4bb1167ca66514c6be5 /meta/recipes-support/boost | |
| parent | 0c82598d22b69d8787faa1f9fe7c2e9bc62c4cfa (diff) | |
| download | poky-07322357f7cef3eb199390ae3b599d75d95c8ebf.tar.gz | |
boost: update 1.79.0 -> 1.80.0
Drop boost-CVE-2012-2677.patch; fixed upstream after 10 years:
https://github.com/boostorg/pool/pull/42
(From OE-Core rev: 34d6cfbb31bbbcd9e4598c7696f12ccc5caca12f)
Signed-off-by: Alexander Kanavin <alex@linutronix.de>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/boost')
| -rw-r--r-- | meta/recipes-support/boost/boost-1.80.0.inc (renamed from meta/recipes-support/boost/boost-1.79.0.inc) | 2 | ||||
| -rw-r--r-- | meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch | 19 | ||||
| -rw-r--r-- | meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch | 112 | ||||
| -rw-r--r-- | meta/recipes-support/boost/boost_1.80.0.bb (renamed from meta/recipes-support/boost/boost_1.79.0.bb) | 3 |
4 files changed, 16 insertions, 120 deletions
diff --git a/meta/recipes-support/boost/boost-1.79.0.inc b/meta/recipes-support/boost/boost-1.80.0.inc index f90c463931..3ee82eb9b2 100644 --- a/meta/recipes-support/boost/boost-1.79.0.inc +++ b/meta/recipes-support/boost/boost-1.80.0.inc | |||
| @@ -12,7 +12,7 @@ BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}" | |||
| 12 | BOOST_P = "boost_${BOOST_VER}" | 12 | BOOST_P = "boost_${BOOST_VER}" |
| 13 | 13 | ||
| 14 | SRC_URI = "https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/${BOOST_P}.tar.bz2" | 14 | SRC_URI = "https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/${BOOST_P}.tar.bz2" |
| 15 | SRC_URI[sha256sum] = "475d589d51a7f8b3ba2ba4eda022b170e562ca3b760ee922c146b6c65856ef39" | 15 | SRC_URI[sha256sum] = "1e19565d82e43bc59209a168f5ac899d3ba471d55c7610c677d4ccf2c9c500c0" |
| 16 | 16 | ||
| 17 | UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/" | 17 | UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/" |
| 18 | UPSTREAM_CHECK_REGEX = "release/(?P<pver>.*)/source/" | 18 | UPSTREAM_CHECK_REGEX = "release/(?P<pver>.*)/source/" |
diff --git a/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch b/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch index 67d5dff125..4fe15741bf 100644 --- a/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch +++ b/meta/recipes-support/boost/boost/0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | From 4d2a8fc8117e56bc283349e5f7f889ebbfc55c71 Mon Sep 17 00:00:00 2001 | 1 | From 21ba558abe074e7d49bdc931018ce2138e6e8eb5 Mon Sep 17 00:00:00 2001 |
| 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> | 2 | From: Alexander Kanavin <alex.kanavin@gmail.com> |
| 3 | Date: Tue, 18 Dec 2018 15:42:57 +0100 | 3 | Date: Tue, 18 Dec 2018 15:42:57 +0100 |
| 4 | Subject: [PATCH] Don't set up arch/instruction-set flags, we do that | 4 | Subject: [PATCH] Don't set up arch/instruction-set flags, we do that |
| @@ -10,14 +10,14 @@ Signed-off-by: Christopher Larson <chris_larson@mentor.com> | |||
| 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> | 10 | Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> |
| 11 | 11 | ||
| 12 | --- | 12 | --- |
| 13 | tools/build/src/tools/gcc.jam | 144 ---------------------------------- | 13 | tools/build/src/tools/gcc.jam | 153 ---------------------------------- |
| 14 | 1 file changed, 144 deletions(-) | 14 | 1 file changed, 153 deletions(-) |
| 15 | 15 | ||
| 16 | diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam | 16 | diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam |
| 17 | index 47a113223..d77525724 100644 | 17 | index 726555369..5c5f8ba91 100644 |
| 18 | --- a/tools/build/src/tools/gcc.jam | 18 | --- a/tools/build/src/tools/gcc.jam |
| 19 | +++ b/tools/build/src/tools/gcc.jam | 19 | +++ b/tools/build/src/tools/gcc.jam |
| 20 | @@ -1122,147 +1122,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + : | 20 | @@ -1124,156 +1124,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + : |
| 21 | <architecture>$(architecture)/<instruction-set>$(instruction-set) | 21 | <architecture>$(architecture)/<instruction-set>$(instruction-set) |
| 22 | : $(values) ; | 22 | : $(values) ; |
| 23 | } | 23 | } |
| @@ -72,6 +72,9 @@ index 47a113223..d77525724 100644 | |||
| 72 | -cpu-flags gcc OPTIONS : x86 : cascadelake : -march=skylake-avx512 -mavx512vnni ; | 72 | -cpu-flags gcc OPTIONS : x86 : cascadelake : -march=skylake-avx512 -mavx512vnni ; |
| 73 | -cpu-flags gcc OPTIONS : x86 : cooperlake : -march=cooperlake ; | 73 | -cpu-flags gcc OPTIONS : x86 : cooperlake : -march=cooperlake ; |
| 74 | -cpu-flags gcc OPTIONS : x86 : tigerlake : -march=tigerlake ; | 74 | -cpu-flags gcc OPTIONS : x86 : tigerlake : -march=tigerlake ; |
| 75 | -cpu-flags gcc OPTIONS : x86 : rocketlake : -march=rocketlake ; | ||
| 76 | -cpu-flags gcc OPTIONS : x86 : alderlake : -march=alderlake ; | ||
| 77 | -cpu-flags gcc OPTIONS : x86 : sapphirerapids : -march=sapphirerapids ; | ||
| 75 | -cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ; | 78 | -cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ; |
| 76 | -cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ; | 79 | -cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ; |
| 77 | -cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ; | 80 | -cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ; |
| @@ -98,6 +101,7 @@ index 47a113223..d77525724 100644 | |||
| 98 | -cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ; | 101 | -cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ; |
| 99 | -cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ; | 102 | -cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ; |
| 100 | -cpu-flags gcc OPTIONS : x86 : znver2 : -march=znver2 ; | 103 | -cpu-flags gcc OPTIONS : x86 : znver2 : -march=znver2 ; |
| 104 | -cpu-flags gcc OPTIONS : x86 : znver3 : -march=znver3 ; | ||
| 101 | -cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ; | 105 | -cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ; |
| 102 | -cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ; | 106 | -cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ; |
| 103 | -cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ; | 107 | -cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ; |
| @@ -165,3 +169,8 @@ index 47a113223..d77525724 100644 | |||
| 165 | -cpu-flags gcc OPTIONS : arm : cortex-r5+vfpv3-d16 : -mcpu=cortex-r5 -mfpu=vfpv3-d16 -mfloat-abi=hard ; | 169 | -cpu-flags gcc OPTIONS : arm : cortex-r5+vfpv3-d16 : -mcpu=cortex-r5 -mfpu=vfpv3-d16 -mfloat-abi=hard ; |
| 166 | -# AIX variant of RS/6000 & PowerPC | 170 | -# AIX variant of RS/6000 & PowerPC |
| 167 | -toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ; | 171 | -toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ; |
| 172 | - | ||
| 173 | -# Enable response file control | ||
| 174 | -toolset.flags gcc RESPONSE_FILE_SUB <response-file>auto : a ; | ||
| 175 | -toolset.flags gcc RESPONSE_FILE_SUB <response-file>file : f ; | ||
| 176 | -toolset.flags gcc RESPONSE_FILE_SUB <response-file>contents : c ; | ||
diff --git a/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch deleted file mode 100644 index 917617a044..0000000000 --- a/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch +++ /dev/null | |||
| @@ -1,112 +0,0 @@ | |||
| 1 | Reference | ||
| 2 | |||
| 3 | https://svn.boost.org/trac/boost/changeset/78326 | ||
| 4 | |||
| 5 | Upstream-Status: Backport | ||
| 6 | CVE: CVE-2012-2677 | ||
| 7 | Signed-off-by: Yue Tao <yue.tao@windriver.com> | ||
| 8 | |||
| 9 | diff --git a/boost/pool/pool.hpp.old b/boost/pool/pool.hpp | ||
| 10 | index c47b11f..417a1e0 100644 | ||
| 11 | --- a/boost/pool/pool.hpp.old | ||
| 12 | +++ b/boost/pool/pool.hpp | ||
| 13 | @@ -26,6 +26,8 @@ | ||
| 14 | |||
| 15 | #include <boost/pool/poolfwd.hpp> | ||
| 16 | |||
| 17 | +// std::numeric_limits | ||
| 18 | +#include <boost/limits.hpp> | ||
| 19 | // boost::integer::static_lcm | ||
| 20 | #include <boost/integer/common_factor_ct.hpp> | ||
| 21 | // boost::simple_segregated_storage | ||
| 22 | @@ -355,6 +357,15 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t | ||
| 23 | return s; | ||
| 24 | } | ||
| 25 | |||
| 26 | + size_type max_chunks() const | ||
| 27 | + { //! Calculated maximum number of memory chunks that can be allocated in a single call by this Pool. | ||
| 28 | + size_type partition_size = alloc_size(); | ||
| 29 | + size_type POD_size = integer::static_lcm<sizeof(size_type), sizeof(void *)>::value + sizeof(size_type); | ||
| 30 | + size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size(); | ||
| 31 | + | ||
| 32 | + return max_chunks; | ||
| 33 | + } | ||
| 34 | + | ||
| 35 | static void * & nextof(void * const ptr) | ||
| 36 | { //! \returns Pointer dereferenced. | ||
| 37 | //! (Provided and used for the sake of code readability :) | ||
| 38 | @@ -375,6 +386,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t | ||
| 39 | //! the first time that object needs to allocate system memory. | ||
| 40 | //! The default is 32. This parameter may not be 0. | ||
| 41 | //! \param nmax_size is the maximum number of chunks to allocate in one block. | ||
| 42 | + set_next_size(nnext_size); | ||
| 43 | + set_max_size(nmax_size); | ||
| 44 | } | ||
| 45 | |||
| 46 | ~pool() | ||
| 47 | @@ -398,8 +411,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t | ||
| 48 | } | ||
| 49 | void set_next_size(const size_type nnext_size) | ||
| 50 | { //! 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. | ||
| 51 | - //! \returns nnext_size. | ||
| 52 | - next_size = start_size = nnext_size; | ||
| 53 | + BOOST_USING_STD_MIN(); | ||
| 54 | + next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks()); | ||
| 55 | } | ||
| 56 | size_type get_max_size() const | ||
| 57 | { //! \returns max_size. | ||
| 58 | @@ -407,7 +420,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t | ||
| 59 | } | ||
| 60 | void set_max_size(const size_type nmax_size) | ||
| 61 | { //! Set max_size. | ||
| 62 | - max_size = nmax_size; | ||
| 63 | + BOOST_USING_STD_MIN(); | ||
| 64 | + max_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nmax_size, max_chunks()); | ||
| 65 | } | ||
| 66 | size_type get_requested_size() const | ||
| 67 | { //! \returns the requested size passed into the constructor. | ||
| 68 | @@ -708,9 +722,9 @@ void * pool<UserAllocator>::malloc_need_resize() | ||
| 69 | |||
| 70 | BOOST_USING_STD_MIN(); | ||
| 71 | if(!max_size) | ||
| 72 | - next_size <<= 1; | ||
| 73 | + set_next_size(next_size << 1); | ||
| 74 | else if( next_size*partition_size/requested_size < max_size) | ||
| 75 | - next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); | ||
| 76 | + set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); | ||
| 77 | |||
| 78 | // initialize it, | ||
| 79 | store().add_block(node.begin(), node.element_size(), partition_size); | ||
| 80 | @@ -748,9 +762,9 @@ void * pool<UserAllocator>::ordered_malloc_need_resize() | ||
| 81 | |||
| 82 | BOOST_USING_STD_MIN(); | ||
| 83 | if(!max_size) | ||
| 84 | - next_size <<= 1; | ||
| 85 | + set_next_size(next_size << 1); | ||
| 86 | else if( next_size*partition_size/requested_size < max_size) | ||
| 87 | - next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); | ||
| 88 | + set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); | ||
| 89 | |||
| 90 | // initialize it, | ||
| 91 | // (we can use "add_block" here because we know that | ||
| 92 | @@ -792,6 +806,8 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n) | ||
| 93 | { //! Gets address of a chunk n, allocating new memory if not already available. | ||
| 94 | //! \returns Address of chunk n if allocated ok. | ||
| 95 | //! \returns 0 if not enough memory for n chunks. | ||
| 96 | + if (n > max_chunks()) | ||
| 97 | + return 0; | ||
| 98 | |||
| 99 | const size_type partition_size = alloc_size(); | ||
| 100 | const size_type total_req_size = n * requested_size; | ||
| 101 | @@ -840,9 +856,9 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n) | ||
| 102 | |||
| 103 | BOOST_USING_STD_MIN(); | ||
| 104 | if(!max_size) | ||
| 105 | - next_size <<= 1; | ||
| 106 | + set_next_size(next_size << 1); | ||
| 107 | else if( next_size*partition_size/requested_size < max_size) | ||
| 108 | - next_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size*requested_size/ partition_size); | ||
| 109 | + set_next_size(min BOOST_PREVENT_MACRO_SUBSTITUTION(next_size << 1, max_size * requested_size / partition_size)); | ||
| 110 | |||
| 111 | // insert it into the list, | ||
| 112 | // handle border case. | ||
diff --git a/meta/recipes-support/boost/boost_1.79.0.bb b/meta/recipes-support/boost/boost_1.80.0.bb index 09e2556790..c34ab7d703 100644 --- a/meta/recipes-support/boost/boost_1.79.0.bb +++ b/meta/recipes-support/boost/boost_1.80.0.bb | |||
| @@ -1,8 +1,7 @@ | |||
| 1 | require boost-${PV}.inc | 1 | require boost-${PV}.inc |
| 2 | require boost.inc | 2 | require boost.inc |
| 3 | 3 | ||
| 4 | SRC_URI += "file://boost-CVE-2012-2677.patch \ | 4 | SRC_URI += "file://boost-math-disable-pch-for-gcc.patch \ |
| 5 | file://boost-math-disable-pch-for-gcc.patch \ | ||
| 6 | file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \ | 5 | file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \ |
| 7 | file://0001-dont-setup-compiler-flags-m32-m64.patch \ | 6 | file://0001-dont-setup-compiler-flags-m32-m64.patch \ |
| 8 | file://0001-The-std-lib-unary-binary_function-base-classes-are-d.patch \ | 7 | file://0001-The-std-lib-unary-binary_function-base-classes-are-d.patch \ |
