diff options
Diffstat (limited to 'common/recipes-support/boost/boost')
7 files changed, 500 insertions, 0 deletions
diff --git a/common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch new file mode 100644 index 00000000..8a85aac1 --- /dev/null +++ b/common/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch @@ -0,0 +1,49 @@ +From 40192301130dcd913aa6d9cb9dba9e5f8dbd9d16 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 21:01:43 +0100 +Subject: [PATCH 1/4] use POSIX poll.h instead of sys/poll.h +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +POSIX specifies that <poll.h> is the correct header to +include for poll() + http://pubs.opengroup.org/onlinepubs/009695399/functions/poll.html +whereas <sys/poll.h> is only needed for ancient glibc (<2.3), +so let's follow POSIX instead. + +As a side-effect, this silences a warning when compiling +against the musl C-library: + +In file included from ./boost/asio/detail/socket_types.hpp:61:0, + from ./boost/asio/ip/address_v4.hpp:21, + from ./boost/asio/ip/address.hpp:21, + from libs/log/src/init_from_settings.cpp:65: +<sysroot>/usr/include/sys/poll.h:1:2: warning: #warning redirecting incorrect #include <sys/poll.h> to <poll.h> [-Wcpp] + #warning redirecting incorrect #include <sys/poll.h> to <poll.h> + ^~~~~~~ + +etc. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/12419 + boost/asio/detail/socket_types.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/asio/detail/socket_types.hpp b/boost/asio/detail/socket_types.hpp +index e8c7109..7e65d3c 100644 +--- a/boost/asio/detail/socket_types.hpp ++++ b/boost/asio/detail/socket_types.hpp +@@ -58,7 +58,7 @@ + #else + # include <sys/ioctl.h> + # if !defined(__SYMBIAN32__) +-# include <sys/poll.h> ++# include <poll.h> + # endif + # include <sys/types.h> + # include <sys/stat.h> +-- +2.9.3 + diff --git a/common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch b/common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch new file mode 100644 index 00000000..0c22fb61 --- /dev/null +++ b/common/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch @@ -0,0 +1,146 @@ +From 5c349a1c391c9ce171a1c80f5164fae764f27dba Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 20:58:59 +0100 +Subject: [PATCH 2/4] boost/test/execution_monitor.hpp: fix mips soft float +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gcc.compile.c++ <builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o + + "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pedantic -pthread -fPIC -Wno-variadic-macros -DBOOST_ALL_NO_LIB=1 -DBOOST_CHRONO_DYN_LINK=1 -DBOOST_SYSTEM_DYN_LINK=1 -DBOOST_SYSTEM_NO_DEPRECATED -DBOOST_TEST_DYN_LINK=1 -DBOOST_TIMER_DYN_LINK=1 -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/test/build/gcc-4.3.1/release/threading-multi/execution_monitor.o" "libs/test/src/execution_monitor.cpp" + +In file included from ./boost/test/impl/execution_monitor.ipp:31:0, + from libs/test/src/execution_monitor.cpp:16: +./boost/test/execution_monitor.hpp:491:27: error: 'FE_DIVBYZERO' was not declared in this scope + BOOST_FPE_DIVBYZERO = FE_DIVBYZERO, + ^~~~~~~~~~~~ +./boost/test/execution_monitor.hpp:492:27: error: 'FE_INEXACT' was not declared in this scope + BOOST_FPE_INEXACT = FE_INEXACT, + ^~~~~~~~~~ +./boost/test/execution_monitor.hpp:493:27: error: 'FE_INVALID' was not declared in this scope + BOOST_FPE_INVALID = FE_INVALID, + ^~~~~~~~~~ +./boost/test/execution_monitor.hpp:494:27: error: 'FE_OVERFLOW' was not declared in this scope + BOOST_FPE_OVERFLOW = FE_OVERFLOW, + ^~~~~~~~~~~ +./boost/test/execution_monitor.hpp:495:27: error: 'FE_UNDERFLOW' was not declared in this scope + BOOST_FPE_UNDERFLOW = FE_UNDERFLOW, + ^~~~~~~~~~~~ + +The reason is that some (notably FPU-less) architectures, +including mips*-nf, don't define/implement some of the +floating point constants, even though fenv.h is +available. + +The key point is: + A fully standards conforming fenv.h does not have to + define any FE_* macros, and if it does define them, + then it defines macros only for the FP exceptions it + actually supports. + +So correct usage requires a triple check: +1) Check BOOST_NO_FENV_H to see if the header is supported. +2) Include the header and then check FE_ALL_EXCEPT to see + if any FP exceptions are supported. +3) Before using the individual FE_* macros, you need to + check for their existence too as not all may be + supported. + +https://svn.boost.org/trac/boost/ticket/11756 + +Other projects have similar issues, e.g. pixman, and +apply similar work-arounds: + https://lists.freedesktop.org/archives/pixman/2014-February/003172.html + +Architectures are notably also allowed to define FE_ALL_EXCEPT to 0! +Keeping this in mind, and knowing that the compiler will eliminate +code that can't be executed, we can change BOOST_FPE_ALL to be 0 for +the case of compiling using Clang and/or fenv.h being unavailable +as well, which allows simplification of the #ifdef's in +execution_monitor.ipp a bit. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Submitted https://svn.boost.org/trac/boost/ticket/11756 + include/boost/test/execution_monitor.hpp | 28 +++++++++++++++++++++++++-- + include/boost/test/impl/execution_monitor.ipp | 10 ++++++++-- + 2 files changed, 34 insertions(+), 4 deletions(-) + +diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp +index cb83c92..109eeb7 100644 +--- a/boost/test/execution_monitor.hpp ++++ b/boost/test/execution_monitor.hpp +@@ -488,15 +488,39 @@ enum masks { + BOOST_FPE_ALL = MCW_EM, + #elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \ + || defined(__ARM_PCS) +- BOOST_FPE_ALL = 1, ++ BOOST_FPE_ALL = 0, + #else ++#if defined(FE_DIVBYZERO) + BOOST_FPE_DIVBYZERO = FE_DIVBYZERO, ++#else ++ BOOST_FPE_DIVBYZERO = 0, ++#endif ++#if defined(FE_INEXACT) + BOOST_FPE_INEXACT = FE_INEXACT, ++#else ++ BOOST_FPE_INEXACT = 0, ++#endif ++#if defined(FE_INVALID) + BOOST_FPE_INVALID = FE_INVALID, ++#else ++ BOOST_FPE_INVALID = 0, ++#endif ++#if defined(FE_OVERFLOW) + BOOST_FPE_OVERFLOW = FE_OVERFLOW, ++#else ++ BOOST_FPE_OVERFLOW = 0, ++#endif ++#if defined(FE_UNDERFLOW) + BOOST_FPE_UNDERFLOW = FE_UNDERFLOW, +- ++#else ++ BOOST_FPE_UNDERFLOW = 0, ++#endif ++ ++#if defined(FE_ALL_EXCEPT) + BOOST_FPE_ALL = FE_ALL_EXCEPT, ++#else ++ BOOST_FPE_ALL = 0, ++#endif + #endif + BOOST_FPE_INV = BOOST_FPE_ALL+1 + }; +diff --git a/boost/test/impl/execution_monitor.ipp b/boost/test/impl/execution_monitor.ipp +index 9929f74..6ce9da1 100644 +--- a/boost/test/impl/execution_monitor.ipp ++++ b/boost/test/impl/execution_monitor.ipp +@@ -1379,7 +1379,10 @@ enable( unsigned mask ) + #endif + + return ~old_cw & BOOST_FPE_ALL; +-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) ++#elif defined(__GLIBC__) && defined(__USE_GNU) ++ if (BOOST_FPE_ALL == 0) ++ /* Not Implemented */ ++ return 0; + ::feclearexcept(BOOST_FPE_ALL); + int res = ::feenableexcept( mask ); + return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; +@@ -1416,7 +1419,10 @@ disable( unsigned mask ) + #endif + + return ~old_cw & BOOST_FPE_ALL; +-#elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) ++#elif defined(__GLIBC__) && defined(__USE_GNU) ++ if (BOOST_FPE_ALL == 0) ++ /* Not Implemented */ ++ return BOOST_FPE_INV; + ::feclearexcept(BOOST_FPE_ALL); + int res = ::fedisableexcept( mask ); + return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; +-- +2.9.3 + diff --git a/common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch new file mode 100644 index 00000000..2b48d0d5 --- /dev/null +++ b/common/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch @@ -0,0 +1,60 @@ +From 4f19d72ca94418431e068cfd4ffb96ed9b289f6c Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Andr=C3=A9=20Draszik?= <adraszik@tycoint.com> +Date: Wed, 24 Aug 2016 17:34:59 +0100 +Subject: [PATCH 3/4] smart_ptr: mips assembly doesn't compile in mips16e mode +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +gcc.compile.c++ <builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o + + "mipsel-poky-linux-musl-g++" "-mel" "-mabi=32" "-msoft-float" "-march=mips32r2" "-mips16" "-minterlink-compressed" "-mtune=24kec" "-mdsp" "-Wl,-O1" "-Wl,--as-needed" "-fstack-protector-strong" "-Wl,-z,relro,-z,now" "--sysroot=<sysroot>" -ftemplate-depth-128 -O2 -pipe -g -feliminate-unused-debug-types -fdebug-prefix-map=<srcdir>=/usr/src/debug/boost/1.61.0-r0 -fdebug-prefix-map=<sysroot_host>= -fdebug-prefix-map=<sysroot>= -fstack-protector-strong -pie -fpie -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security -fvisibility-inlines-hidden -O3 -finline-functions -Wno-inline -Wall -pthread -fPIC -DBOOST_ALL_DYN_LINK=1 -DBOOST_ALL_NO_LIB=1 -DDATE_TIME_INLINE -DNDEBUG -I"." -c -o "<builddir>/boost/bin.v2/libs/date_time/build/gcc-4.3.1/release/threading-multi/gregorian/greg_month.o" "libs/date_time/src/gregorian/greg_month.cpp" + +{standard input}: Assembler messages: +{standard input}:17603: Warning: the `dsp' extension requires MIPS32 revision 2 or greater +{standard input}:17604: Error: unrecognized opcode `ll $3,4($16)' +{standard input}:17606: Error: unrecognized opcode `sc $2,4($16)' +{standard input}:17734: Error: unrecognized opcode `ll $3,8($16)' +{standard input}:17736: Error: unrecognized opcode `sc $2,8($16)' +{standard input}:18084: Error: unrecognized opcode `ll $3,4($4)' +{standard input}:18086: Error: unrecognized opcode `sc $2,4($4)' +{standard input}:18318: Error: unrecognized opcode `ll $3,8($4)' +{standard input}:18320: Error: unrecognized opcode `sc $2,8($4)' +{standard input}:19921: Error: unrecognized opcode `ll $3,4($2)' +{standard input}:19923: Error: unrecognized opcode `sc $3,4($2)' +{standard input}:20199: Error: unrecognized opcode `ll $4,4($16)' +{standard input}:20201: Error: unrecognized opcode `sc $2,4($16)' +{standard input}:23392: Error: unrecognized opcode `ll $4,8($16)' +{standard input}:23394: Error: unrecognized opcode `sc $2,8($16)' +...failed updating 1 target... + +boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp +contains hand-written MIPS assembly, which is not compatible +with the MIPS16e instruction set. + +By not using this file in MIPS16e mode, we fallback to using +g++ 4.1+ __sync intrinsics (__sync_fetch_and_add() and +__sync_val_compare_and_swap()) which are working fine. + +Signed-off-by: André Draszik <adraszik@tycoint.com> +--- +Upstream-Status: Backport https://svn.boost.org/trac/boost/ticket/12418 + boost/smart_ptr/detail/sp_counted_base.hpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp +index 0addf07..0995ca8 100644 +--- a/boost/smart_ptr/detail/sp_counted_base.hpp ++++ b/boost/smart_ptr/detail/sp_counted_base.hpp +@@ -65,7 +65,7 @@ + #elif defined( __GNUC__ ) && ( defined( __powerpc__ ) || defined( __ppc__ ) || defined( __ppc ) ) && !defined(__PATHSCALE__) && !defined( _AIX ) + # include <boost/smart_ptr/detail/sp_counted_base_gcc_ppc.hpp> + +-#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) ++#elif defined( __GNUC__ ) && ( defined( __mips__ ) || defined( _mips ) ) && !defined(__PATHSCALE__) && !defined( __mips16 ) + # include <boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp> + + #elif defined( BOOST_SP_HAS_SYNC ) +-- +2.9.3 + diff --git a/common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch new file mode 100644 index 00000000..ab7826ba --- /dev/null +++ b/common/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch @@ -0,0 +1,59 @@ +From c234cc557f60729e071d6da59747c1a9289555c5 Mon Sep 17 00:00:00 2001 +From: Peter Dimov <pdimov@pdimov.com> +Date: Sun, 28 Aug 2016 21:28:21 +0300 +Subject: [PATCH 4/4] Use <atomic> by default when BOOST_NO_CXX11_HDR_ATOMIC is + not defined + +--- +Upstream-Status: Backport [https://github.com/boostorg/smart_ptr/commit/20fedcff2ca3143503ec4e876d47745ab0ec7b0c] +Signed-off-by: André Draszik <git@andred.net> + boost/smart_ptr/detail/atomic_count.hpp | 3 +++ + boost/smart_ptr/detail/sp_counted_base.hpp | 3 +++ + boost/smart_ptr/detail/spinlock.hpp | 3 +++ + 3 files changed, 9 insertions(+) + +diff --git a/boost/smart_ptr/detail/atomic_count.hpp b/boost/smart_ptr/detail/atomic_count.hpp +index 8aefd44..6e4f71a 100644 +--- a/boost/smart_ptr/detail/atomic_count.hpp ++++ b/boost/smart_ptr/detail/atomic_count.hpp +@@ -73,6 +73,9 @@ + #elif defined( BOOST_DISABLE_THREADS ) && !defined( BOOST_SP_ENABLE_THREADS ) && !defined( BOOST_DISABLE_WIN32 ) + # include <boost/smart_ptr/detail/atomic_count_nt.hpp> + ++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) ++# include <boost/smart_ptr/detail/atomic_count_std_atomic.hpp> ++ + #elif defined( __GNUC__ ) && ( defined( __i386__ ) || defined( __x86_64__ ) ) && !defined( __PATHSCALE__ ) + # include <boost/smart_ptr/detail/atomic_count_gcc_x86.hpp> + +diff --git a/boost/smart_ptr/detail/sp_counted_base.hpp b/boost/smart_ptr/detail/sp_counted_base.hpp +index 0995ca8..83ede23 100644 +--- a/boost/smart_ptr/detail/sp_counted_base.hpp ++++ b/boost/smart_ptr/detail/sp_counted_base.hpp +@@ -44,6 +44,9 @@ + #elif defined( BOOST_SP_HAS_CLANG_C11_ATOMICS ) + # include <boost/smart_ptr/detail/sp_counted_base_clang.hpp> + ++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) ++# include <boost/smart_ptr/detail/sp_counted_base_std_atomic.hpp> ++ + #elif defined( __SNC__ ) + # include <boost/smart_ptr/detail/sp_counted_base_snc_ps3.hpp> + +diff --git a/boost/smart_ptr/detail/spinlock.hpp b/boost/smart_ptr/detail/spinlock.hpp +index 19f93d7..0b618df 100644 +--- a/boost/smart_ptr/detail/spinlock.hpp ++++ b/boost/smart_ptr/detail/spinlock.hpp +@@ -43,6 +43,9 @@ + #elif defined( BOOST_SP_USE_PTHREADS ) + # include <boost/smart_ptr/detail/spinlock_pt.hpp> + ++#elif !defined( BOOST_NO_CXX11_HDR_ATOMIC ) ++# include <boost/smart_ptr/detail/spinlock_std_atomic.hpp> ++ + #elif defined(__GNUC__) && defined( __arm__ ) && !defined( __thumb__ ) + # include <boost/smart_ptr/detail/spinlock_gcc_arm.hpp> + +-- +2.9.3 + diff --git a/common/recipes-support/boost/boost/arm-intrinsics.patch b/common/recipes-support/boost/boost/arm-intrinsics.patch new file mode 100644 index 00000000..fe85c69a --- /dev/null +++ b/common/recipes-support/boost/boost/arm-intrinsics.patch @@ -0,0 +1,55 @@ +Upstream-Status: Backport + +8/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com> + +diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp +index b6359b5..78b1cc2 100644 +--- a/boost/smart_ptr/detail/atomic_count_sync.hpp ++++ b/boost/smart_ptr/detail/atomic_count_sync.hpp +@@ -33,17 +33,46 @@ public: + + long operator++() + { ++#ifdef __ARM_ARCH_7A__ ++ int v1, tmp; ++ asm volatile ("1: \n\t" ++ "ldrex %0, %1 \n\t" ++ "add %0 ,%0, #1 \n\t" ++ "strex %2, %0, %1 \n\t" ++ "cmp %2, #0 \n\t" ++ "bne 1b \n\t" ++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp) ++ ); ++#else + return __sync_add_and_fetch( &value_, 1 ); ++#endif + } + + long operator--() + { ++#ifdef __ARM_ARCH_7A__ ++ int v1, tmp; ++ asm volatile ("1: \n\t" ++ "ldrex %0, %1 \n\t" ++ "sub %0 ,%0, #1 \n\t" ++ "strex %2, %0, %1 \n\t" ++ "cmp %2, #0 \n\t" ++ "bne 1b \n\t" ++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp) ++ ); ++ return value_; ++#else + return __sync_add_and_fetch( &value_, -1 ); ++#endif + } + + operator long() const + { ++#if __ARM_ARCH_7A__ ++ return value_; ++#else + return __sync_fetch_and_add( &value_, 0 ); ++#endif + } + + private: diff --git a/common/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/common/recipes-support/boost/boost/boost-CVE-2012-2677.patch new file mode 100644 index 00000000..917617a0 --- /dev/null +++ b/common/recipes-support/boost/boost/boost-CVE-2012-2677.patch @@ -0,0 +1,112 @@ +Reference + +https://svn.boost.org/trac/boost/changeset/78326 + +Upstream-Status: Backport +CVE: CVE-2012-2677 +Signed-off-by: Yue Tao <yue.tao@windriver.com> + +diff --git a/boost/pool/pool.hpp.old b/boost/pool/pool.hpp +index c47b11f..417a1e0 100644 +--- a/boost/pool/pool.hpp.old ++++ b/boost/pool/pool.hpp +@@ -26,6 +26,8 @@ + + #include <boost/pool/poolfwd.hpp> + ++// std::numeric_limits ++#include <boost/limits.hpp> + // boost::integer::static_lcm + #include <boost/integer/common_factor_ct.hpp> + // boost::simple_segregated_storage +@@ -355,6 +357,15 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + return s; + } + ++ 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); ++ size_type max_chunks = (std::numeric_limits<size_type>::max() - POD_size) / alloc_size(); ++ ++ return max_chunks; ++ } ++ + static void * & nextof(void * const ptr) + { //! \returns Pointer dereferenced. + //! (Provided and used for the sake of code readability :) +@@ -375,6 +386,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + //! 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. ++ set_next_size(nnext_size); ++ set_max_size(nmax_size); + } + + ~pool() +@@ -398,8 +411,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + } + 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; ++ BOOST_USING_STD_MIN(); ++ next_size = start_size = min BOOST_PREVENT_MACRO_SUBSTITUTION(nnext_size, max_chunks()); + } + size_type get_max_size() const + { //! \returns max_size. +@@ -407,7 +420,8 @@ class pool: protected simple_segregated_storage < typename UserAllocator::size_t + } + 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 + { //! \returns the requested size passed into the constructor. +@@ -708,9 +722,9 @@ void * pool<UserAllocator>::malloc_need_resize() + + 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, + store().add_block(node.begin(), node.element_size(), partition_size); +@@ -748,9 +762,9 @@ void * pool<UserAllocator>::ordered_malloc_need_resize() + + 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, + // (we can use "add_block" here because we know that +@@ -792,6 +806,8 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n) + { //! Gets address of a chunk n, allocating new memory if not already available. + //! \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(); + const size_type total_req_size = n * requested_size; +@@ -840,9 +856,9 @@ void * pool<UserAllocator>::ordered_malloc(const size_type n) + + 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, + // handle border case. diff --git a/common/recipes-support/boost/boost/consider-hardfp.patch b/common/recipes-support/boost/boost/consider-hardfp.patch new file mode 100644 index 00000000..66808a69 --- /dev/null +++ b/common/recipes-support/boost/boost/consider-hardfp.patch @@ -0,0 +1,19 @@ +When using soft-float, on ARM we should not expect the FE_* symbols + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +Upstream-Status: Pending + +Index: boost_1_60_0/boost/test/execution_monitor.hpp +=================================================================== +--- boost_1_60_0.orig/boost/test/execution_monitor.hpp ++++ boost_1_60_0/boost/test/execution_monitor.hpp +@@ -484,7 +484,8 @@ enum masks { + BOOST_FPE_UNDERFLOW = EM_UNDERFLOW|EM_DENORMAL, + + BOOST_FPE_ALL = MCW_EM, +-#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) ++#elif defined(BOOST_NO_FENV_H) || defined(BOOST_CLANG) \ ++ || defined(__ARM_PCS) + BOOST_FPE_ALL = 1, + #else + BOOST_FPE_DIVBYZERO = FE_DIVBYZERO, |