diff options
Diffstat (limited to 'import-layers/yocto-poky/meta/recipes-support/boost')
12 files changed, 514 insertions, 72 deletions
diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb index 32646d707..32646d707 100644 --- a/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.60.0.bb +++ b/import-layers/yocto-poky/meta/recipes-support/boost/bjam-native_1.61.0.bb diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc index a38693e25..cd9d8a495 100644 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.60.0.inc +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost-1.61.0.inc @@ -7,13 +7,13 @@ HOMEPAGE = "http://www.boost.org/" LICENSE = "BSL-1.0 & MIT & Python-2.0" LIC_FILES_CHKSUM = "file://LICENSE_1_0.txt;md5=e4224ccaecb14d942c71d31bef20d78c" -BOOST_VER = "${@"_".join(d.getVar("PV",1).split("."))}" -BOOST_MAJ = "${@"_".join(d.getVar("PV",1).split(".")[0:2])}" +BOOST_VER = "${@"_".join(d.getVar("PV", True).split("."))}" +BOOST_MAJ = "${@"_".join(d.getVar("PV", True).split(".")[0:2])}" BOOST_P = "boost_${BOOST_VER}" SRC_URI = "${SOURCEFORGE_MIRROR}/boost/${BOOST_P}.tar.bz2" -SRC_URI[md5sum] = "65a840e1a0b13a558ff19eeb2c4f0cbe" -SRC_URI[sha256sum] = "686affff989ac2488f79a97b9479efb9f2abae035b5ed4d8226de6857933fd3b" +SRC_URI[md5sum] = "6095876341956f65f9d35939ccea1a9f" +SRC_URI[sha256sum] = "a547bd06c2fd9a71ba1d169d9cf0339da7ebf4753849a8f7d6fdb8feee99b640" S = "${WORKDIR}/${BOOST_P}" diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc index 982446c06..ef16533ba 100644 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost.inc @@ -8,11 +8,14 @@ ARM_INSTRUCTION_SET_armv5 = "arm" BOOST_LIBS = "\ atomic \ chrono \ + container \ date_time \ + exception \ filesystem \ graph \ iostreams \ log \ + math \ program_options \ random \ regex \ @@ -22,12 +25,30 @@ BOOST_LIBS = "\ timer \ test \ thread \ + wave \ " -# optional boost-python library -PACKAGECONFIG ??= "" +# only supported by x86 and powerpc +BOOST_LIBS_append_x86 = " context coroutine" +BOOST_LIBS_append_x86-64 = " context coroutine" +BOOST_LIBS_append_powerpc = " context coroutine" +# need consistent settings for native builds (x86 override not applied for native) +BOOST_LIBS_remove_class-native = " context coroutine" + +# optional libraries +PACKAGECONFIG ??= "locale" +PACKAGECONFIG[locale] = ",,icu" +PACKAGECONFIG[graph_parallel] = ",,,boost-mpi mpich" +PACKAGECONFIG[mpi] = ",,mpich" PACKAGECONFIG[python] = ",,python python3" -BOOST_LIBS += "${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)}" + +BOOST_LIBS += "\ + ${@bb.utils.contains('PACKAGECONFIG', 'locale', 'locale', '', d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'graph_parallel', 'graph_parallel mpi', \ + bb.utils.contains('PACKAGECONFIG', 'mpi', 'mpi', '', d), d)} \ + ${@bb.utils.contains('PACKAGECONFIG', 'python', 'python python3', '', d)} \ +" + inherit python-dir PYTHON_ROOT = "${STAGING_DIR_HOST}/${prefix}" @@ -54,6 +75,10 @@ python __anonymous () { } # Override the contents of specific packages +FILES_${PN}-graph = "${libdir}/libboost_graph.so.*" +FILES_${PN}-graph_parallel = "${libdir}/libboost_graph_parallel.so.*" +FILES_${PN}-locale = "${libdir}/libboost_locale.so.*" +FILES_${PN}-mpi = "${libdir}/mpi.so ${libdir}/libboost_mpi*.so.*" FILES_boost-serialization = "${libdir}/libboost_serialization*.so.* \ ${libdir}/libboost_wserialization*.so.*" FILES_boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ @@ -142,7 +167,7 @@ def get_boost_parallel_make(d): BOOST_PARALLEL_MAKE = "${@get_boost_parallel_make(d)}" BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \ ${BJAM_TOOLS} \ - -sBOOST_BUILD_USER_CONFIG=${S}/tools/build/example/user-config.jam \ + -sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \ --build-dir=${S}/${TARGET_SYS} \ --disable-icu \ ${BJAM_EXTRA}' @@ -150,25 +175,26 @@ BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \ # Native compilation of bzip2 isn't working BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1' -do_boostconfig() { - cp -f boost/config/platform/linux.hpp boost/config/platform/linux-gnueabi.hpp +do_configure() { + cp -f ${S}/boost/config/platform/linux.hpp ${S}/boost/config/platform/linux-gnueabi.hpp # D2194:Fixing the failure of "error: duplicate initialization of gcc with the following parameters" during compilation. - sed -i "/^using gcc : 4.3.1/d" ${S}/tools/build/example/user-config.jam - sed -i "/^using python : ${PYTHON_BASEVERSION}"/d ${S}/tools/build/example/user-config.jam - echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${S}/tools/build/example/user-config.jam - echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${S}/tools/build/example/user-config.jam - echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${S}/tools/build/example/user-config.jam + rm -f ${WORKDIR}/user-config.jam + echo 'using gcc : 4.3.1 : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam + echo "using python : ${PYTHON_BASEVERSION} : : ${STAGING_INCDIR}/python${PYTHON_BASEVERSION} ;" >> ${WORKDIR}/user-config.jam + echo "using python : 3.5 : : ${STAGING_INCDIR}/python3.5m ;" >> ${WORKDIR}/user-config.jam + + if ${@bb.utils.contains('BOOST_LIBS', 'mpi', 'true', 'false', d)}; then + echo "using mpi : : <find-shared-library>mpi ;" >> ${WORKDIR}/user-config.jam + fi CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=bjam --with-toolset=gcc --with-python-root=${PYTHON_ROOT} - sed -i '/^using python/d' project-config.jam + sed -i '/^using python/d' ${S}/project-config.jam } -do_boostconfig[dirs] = "${S}" -addtask do_boostconfig after do_patch before do_configure - do_compile() { set -ex + rm -rf ${S}/${TARGET_SYS} bjam ${BJAM_OPTS} --prefix=${prefix} \ --exec-prefix=${exec_prefix} \ --libdir=${libdir} \ diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch deleted file mode 100644 index df7e71fea..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch +++ /dev/null @@ -1,45 +0,0 @@ -From f50e7bc9fed323c5705c0ed992c03e80eeec1dd6 Mon Sep 17 00:00:00 2001 -From: Jonathan Wakely <jwakely@redhat.com> -Date: Mon, 14 Sep 2015 15:05:24 +0100 -Subject: [PATCH] Do not qualify <fenv.h> names that might be macros. - -The patch was imported from the boost-test git repository -(https://github.com/boostorg/test) as of commit id -f50e7bc9fed323c5705c0ed992c03e80eeec1dd6. - -Upstream-Status: Accepted [commit f50e7bc9fed in develop branch] - -Signed-off-by: Lukas Bulwahn <lukas.bulwahn@oss.bmw-carit.de> ---- - include/boost/test/impl/execution_monitor.ipp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/include/boost/test/impl/execution_monitor.ipp b/include/boost/test/impl/execution_monitor.ipp -index b3e873e..a7bdce2 100644 ---- a/include/boost/test/impl/execution_monitor.ipp -+++ b/include/boost/test/impl/execution_monitor.ipp -@@ -1380,8 +1380,8 @@ enable( unsigned mask ) - - return ~old_cw & BOOST_FPE_ALL; - #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) -- ::feclearexcept(BOOST_FPE_ALL); -- int res = ::feenableexcept( mask ); -+ feclearexcept(BOOST_FPE_ALL); -+ int res = feenableexcept( mask ); - return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; - #else - /* Not Implemented */ -@@ -1417,8 +1417,8 @@ disable( unsigned mask ) - - return ~old_cw & BOOST_FPE_ALL; - #elif defined(__GLIBC__) && defined(__USE_GNU) && !defined(BOOST_CLANG) && !defined(BOOST_NO_FENV_H) -- ::feclearexcept(BOOST_FPE_ALL); -- int res = ::fedisableexcept( mask ); -+ feclearexcept(BOOST_FPE_ALL); -+ int res = fedisableexcept( mask ); - return res == -1 ? (unsigned)BOOST_FPE_INV : (unsigned)res; - #else - /* Not Implemented */ --- -1.9.1 - diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch new file mode 100644 index 000000000..8a85aac18 --- /dev/null +++ b/import-layers/yocto-poky/meta/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/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch new file mode 100644 index 000000000..569c98733 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch @@ -0,0 +1,145 @@ +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 + boost/test/execution_monitor.hpp | 26 +++++++++++++++++++++++++- + boost/test/impl/execution_monitor.ipp | 10 ++++++++-- + 2 files changed, 33 insertions(+), 3 deletions(-) + +diff --git a/boost/test/execution_monitor.hpp b/boost/test/execution_monitor.hpp +index 0eee497..44fe59d 100644 +--- a/boost/test/execution_monitor.hpp ++++ b/boost/test/execution_monitor.hpp +@@ -486,15 +486,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 f7fc8ea..d1088b9 100644 +--- a/boost/test/impl/execution_monitor.ipp ++++ b/boost/test/impl/execution_monitor.ipp +@@ -1381,7 +1381,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; +@@ -1418,7 +1421,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/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch new file mode 100644 index 000000000..2b48d0d5d --- /dev/null +++ b/import-layers/yocto-poky/meta/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/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch new file mode 100644 index 000000000..ab7826ba2 --- /dev/null +++ b/import-layers/yocto-poky/meta/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/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-CVE-2012-2677.patch new file mode 100644 index 000000000..917617a04 --- /dev/null +++ b/import-layers/yocto-poky/meta/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/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch new file mode 100644 index 000000000..595ba1786 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost/boost-math-disable-pch-for-gcc.patch @@ -0,0 +1,31 @@ +From cabfcba1ff7511ffd6b91ca244288d44f585aad2 Mon Sep 17 00:00:00 2001 +From: Jackie Huang <jackie.huang@windriver.com> +Date: Fri, 23 Sep 2016 01:04:50 -0700 +Subject: [PATCH] boost-math: disable pch for gcc + +Upstream-Status: Inappropriate [*] + +* It's a work around for a defect when build in parallel: +https://svn.boost.org/trac/boost/ticket/12477 + +Signed-off-by: Jackie Huang <jackie.huang@windriver.com> +--- + libs/math/build/Jamfile.v2 | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/libs/math/build/Jamfile.v2 b/libs/math/build/Jamfile.v2 +index e19fb2e..82472a7 100644 +--- a/libs/math/build/Jamfile.v2 ++++ b/libs/math/build/Jamfile.v2 +@@ -13,7 +13,7 @@ project + #<toolset>intel-linux:<pch>off + <toolset>intel-darwin:<pch>off + <toolset>msvc-7.1:<pch>off +- <toolset>gcc,<target-os>windows:<pch>off ++ <toolset>gcc:<pch>off + #<toolset>gcc:<cxxflags>-fvisibility=hidden + <toolset>intel-linux:<cxxflags>-fvisibility=hidden + #<toolset>sun:<cxxflags>-xldscope=hidden +-- +2.7.4 + diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb deleted file mode 100644 index 4d824c85b..000000000 --- a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.60.0.bb +++ /dev/null @@ -1,8 +0,0 @@ -include boost-${PV}.inc -include boost.inc - -SRC_URI += "\ - file://arm-intrinsics.patch \ - file://0001-Do-not-qualify-fenv.h-names-that-might-be-macros.patch;striplevel=2 \ - file://consider-hardfp.patch \ -" diff --git a/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb new file mode 100644 index 000000000..40e3870a3 --- /dev/null +++ b/import-layers/yocto-poky/meta/recipes-support/boost/boost_1.61.0.bb @@ -0,0 +1,13 @@ +include boost-${PV}.inc +include boost.inc + +SRC_URI += "\ + file://arm-intrinsics.patch \ + file://consider-hardfp.patch \ + file://boost-CVE-2012-2677.patch \ + file://0001-boost-asio-detail-socket_types.hpp-fix-poll.h-includ.patch \ + file://0002-boost-test-execution_monitor.hpp-fix-mips-soft-float.patch \ + file://0003-smart_ptr-mips-assembly-doesn-t-compile-in-mips16e-m.patch \ + file://0004-Use-atomic-by-default-when-BOOST_NO_CXX11_HDR_ATOMIC.patch \ + file://boost-math-disable-pch-for-gcc.patch \ +" |