diff options
Diffstat (limited to 'meta/recipes-support/boost')
12 files changed, 201 insertions, 294 deletions
diff --git a/meta/recipes-support/boost/bjam-native_1.71.0.bb b/meta/recipes-support/boost/bjam-native_1.71.0.bb deleted file mode 100644 index d843eb038c..0000000000 --- a/meta/recipes-support/boost/bjam-native_1.71.0.bb +++ /dev/null @@ -1,20 +0,0 @@ -require boost-${PV}.inc - -SUMMARY = "Portable Boost.Jam build tool for boost" -SECTION = "devel" - -inherit native - -SRC_URI += "file://0001-Build-debug-version-of-bjam.patch \ - file://0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch \ - " - -do_compile() { - ./bootstrap.sh --with-toolset=gcc -} - -do_install() { - install -d ${D}${bindir}/ - # install unstripped version for bjam - install -c -m 755 b2 ${D}${bindir}/bjam -} diff --git a/meta/recipes-support/boost/boost-1.71.0.inc b/meta/recipes-support/boost/boost-1.77.0.inc index 7164d0f1c5..6df06e76c7 100644 --- a/meta/recipes-support/boost/boost-1.71.0.inc +++ b/meta/recipes-support/boost/boost-1.77.0.inc @@ -11,11 +11,10 @@ BOOST_VER = "${@"_".join(d.getVar("PV").split("."))}" BOOST_MAJ = "${@"_".join(d.getVar("PV").split(".")[0:2])}" BOOST_P = "boost_${BOOST_VER}" -SRC_URI = "https://dl.bintray.com/boostorg/release/${PV}/source/${BOOST_P}.tar.bz2" -SRC_URI[md5sum] = "4cdf9b5c2dc01fb2b7b733d5af30e558" -SRC_URI[sha256sum] = "d73a8da01e8bf8c7eda40b4c84915071a8c8a0df4a6734537ddde4a8580524ee" +SRC_URI = "https://boostorg.jfrog.io/artifactory/main/release/${PV}/source/${BOOST_P}.tar.bz2" +SRC_URI[sha256sum] = "fc9f85fc030e233142908241af7a846e60630aa7388de9a5fafb1f3a26840854" UPSTREAM_CHECK_URI = "http://www.boost.org/users/download/" -UPSTREAM_CHECK_REGEX = "boostorg/release/(?P<pver>.*)/source/" +UPSTREAM_CHECK_REGEX = "release/(?P<pver>.*)/source/" S = "${WORKDIR}/${BOOST_P}" diff --git a/meta/recipes-support/boost/boost-build-native_4.4.1.bb b/meta/recipes-support/boost/boost-build-native_4.4.1.bb new file mode 100644 index 0000000000..2de05369a8 --- /dev/null +++ b/meta/recipes-support/boost/boost-build-native_4.4.1.bb @@ -0,0 +1,27 @@ +SUMMARY = "Boost.Build" +DESCRIPTION = "B2 makes it easy to build C++ projects, everywhere." +HOMEPAGE = "https://github.com/boostorg/build" +SECTION = "devel" + +LICENSE = "BSL-1.0" +LIC_FILES_CHKSUM = "file://LICENSE.txt;md5=e4224ccaecb14d942c71d31bef20d78c" + +SRC_URI = "git://github.com/boostorg/build;protocol=https" +SRCREV = "76da80f33187a3d9e5336157cdfae12ce82e37eb" + +UPSTREAM_CHECK_GITTAGREGEX = "(?P<pver>(\d+(\.\d+){2,}))" + +inherit native + +S = "${WORKDIR}/git" + +do_compile() { + ./bootstrap.sh +} + +do_install() { + HOME=/var/run ./b2 install --prefix=${prefix} staging-prefix=${D}${prefix} +} + +# The build is either release mode (pre-stripped) or debug (-O0). +INSANE_SKIP:${PN} = "already-stripped" diff --git a/meta/recipes-support/boost/boost.inc b/meta/recipes-support/boost/boost.inc index e15dce4e1d..fa49ed3f8a 100644 --- a/meta/recipes-support/boost/boost.inc +++ b/meta/recipes-support/boost/boost.inc @@ -1,21 +1,32 @@ SUMMARY = "Free peer-reviewed portable C++ source libraries" +DESCRIPTION = "Provides free peer-reviewed portable C++ source libraries. The emphasis is on libraries which work well with the C++ \ +Standard Library. One goal is to establish 'existing practice' and \ +provide reference implementations so that the Boost libraries are suitable for eventual standardization. Some of the libraries have already been proposed for inclusion in the C++ Standards Committee's \ +upcoming C++ Standard Library Technical Report." SECTION = "libs" -DEPENDS = "bjam-native zlib bzip2" +DEPENDS = "boost-build-native zlib bzip2" CVE_PRODUCT = "boost:boost" -ARM_INSTRUCTION_SET_armv4 = "arm" -ARM_INSTRUCTION_SET_armv5 = "arm" +ARM_INSTRUCTION_SET:armv4 = "arm" +ARM_INSTRUCTION_SET:armv5 = "arm" + +B = "${WORKDIR}/build" +do_configure[cleandirs] = "${B}" BOOST_LIBS = "\ atomic \ chrono \ container \ + context \ contract \ + coroutine \ date_time \ exception \ + fiber \ filesystem \ graph \ + headers \ iostreams \ log \ math \ @@ -24,23 +35,13 @@ BOOST_LIBS = "\ regex \ serialization \ system \ - timer \ test \ thread \ + timer \ + type_erasure \ wave \ " -# 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" -BOOST_LIBS_append_arm = " context coroutine" -BOOST_LIBS_append_aarch64 = " context coroutine" -# need consistent settings for native builds (x86 override not applied for native) -BOOST_LIBS_remove_class-native = " context coroutine" -# does not compile -BOOST_LIBS_remove_mips16e = "wave" - # optional libraries PACKAGECONFIG ??= "locale python" PACKAGECONFIG[locale] = ",,icu" @@ -62,36 +63,43 @@ PACKAGES = "${PN}-dbg ${BOOST_PACKAGES}" python __anonymous () { packages = [] extras = [] + pn = d.getVar("PN") + mlprefix = d.getVar("MLPREFIX") for lib in d.getVar('BOOST_LIBS').split(): extras.append("--with-%s" % lib) - pkg = "boost-%s" % lib.replace("_", "-") - packages.append(pkg) - if not d.getVar("FILES_%s" % pkg): - d.setVar("FILES_%s" % pkg, "${libdir}/libboost_%s*.so.*" % lib) + pkg = "boost-%s" % (lib.replace("_", "-")) + if "-native" in pn: + pkg = pkg + "-native" + packages.append(mlprefix + pkg) + if not d.getVar("FILES:%s" % pkg): + d.setVar("FILES:%s%s" % (mlprefix, pkg), "${libdir}/libboost_%s*.so.*" % lib) + else: + d.setVar("FILES:%s%s" % (mlprefix, pkg), d.getVar("FILES:%s" % pkg)) + d.setVar("BOOST_PACKAGES", " ".join(packages)) d.setVar("BJAM_EXTRA", " ".join(extras)) } # Override the contents of specific packages -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.* \ +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.* \ +FILES:boost-test = "${libdir}/libboost_prg_exec_monitor*.so.* \ ${libdir}/libboost_unit_test_framework*.so.*" # -dev last to pick up the remaining stuff PACKAGES += "${PN}-dev ${PN}-staticdev" -FILES_${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/cmake" -FILES_${PN}-staticdev = "${libdir}/libboost_*.a" +FILES:${PN}-dev = "${includedir} ${libdir}/libboost_*.so ${libdir}/cmake" +FILES:${PN}-staticdev = "${libdir}/libboost_*.a" # "boost" is a metapackage which pulls in all boost librabries PACKAGES += "${PN}" -FILES_${PN} = "" -ALLOW_EMPTY_${PN} = "1" -RRECOMMENDS_${PN} += "${BOOST_PACKAGES}" -RRECOMMENDS_${PN}_class-native = "" +FILES:${PN} = "" +ALLOW_EMPTY:${PN} = "1" +RRECOMMENDS:${PN} += "${BOOST_PACKAGES}" +RRECOMMENDS:${PN}:class-native = "" # to avoid GNU_HASH QA errors added LDFLAGS to ARCH; a little bit dirty but at least it works TARGET_CC_ARCH += "${LDFLAGS}" @@ -142,26 +150,27 @@ BOOST_PARALLEL_MAKE = "${@oe.utils.parallel_make_argument(d, '-j%d')}" BJAM_OPTS = '${BOOST_PARALLEL_MAKE} -d+2 -q \ ${BJAM_TOOLS} \ -sBOOST_BUILD_USER_CONFIG=${WORKDIR}/user-config.jam \ - --build-dir=${S}/${TARGET_SYS} \ + --build-dir=${B} \ --disable-icu \ ${BJAM_EXTRA}' # Native compilation of bzip2 isn't working -BJAM_OPTS_append_class-native = ' -sNO_BZIP2=1' +BJAM_OPTS:append:class-native = ' -sNO_BZIP2=1' # Adjust the build for x32 -BJAM_OPTS_append_x86-x32 = " abi=x32 address-model=64" +BJAM_OPTS:append:x86-x32 = " abi=x32 address-model=64" # cross compiling for arm fails to detect abi, so provide some help -BJAM_OPTS_append_arm = " abi=aapcs architecture=arm" -BJAM_OPTS_append_aarch64 = " abi=aapcs address-model=64 architecture=arm" +BJAM_OPTS:append:arm = " abi=aapcs architecture=arm" +BJAM_OPTS:append:aarch64 = " abi=aapcs address-model=64 architecture=arm" do_configure() { + cd ${S} 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. 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 gcc : : ${CXX} : <cflags>"${CFLAGS}" <cxxflags>"${CXXFLAGS}" <linkflags>"${LDFLAGS}" ;' >> ${WORKDIR}/user-config.jam # If we want Python then we need to tell Boost *exactly* where to find it if ${@bb.utils.contains('BOOST_LIBS', 'python', 'true', 'false', d)}; then @@ -172,7 +181,7 @@ do_configure() { 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 + CC="${BUILD_CC}" CFLAGS="${BUILD_CFLAGS}" ./bootstrap.sh --with-bjam=b2 --with-toolset=gcc # Boost can't be trusted to find Python on it's own, so remove any mention # of it from the boost configuration @@ -180,8 +189,9 @@ do_configure() { } do_compile() { - rm -rf ${S}/${TARGET_SYS} - bjam ${BJAM_OPTS} --prefix=${prefix} \ + cd ${S} + b2 ${BJAM_OPTS} \ + --prefix=${prefix} \ --exec-prefix=${exec_prefix} \ --libdir=${libdir} \ --includedir=${includedir} \ @@ -189,7 +199,8 @@ do_compile() { } do_install() { - bjam ${BJAM_OPTS} \ + cd ${S} + b2 ${BJAM_OPTS} \ --libdir=${D}${libdir} \ --includedir=${D}${includedir} \ install @@ -202,6 +213,11 @@ do_install() { fi done + # Cmake files reference full paths to image + find ${D}${libdir}/cmake -type f | \ + grep 'cmake$' | \ + xargs -n 1 sed -e 's,${D}${libdir}/cmake,${libdir}/cmake,' -i + } BBCLASSEXTEND = "native nativesdk" diff --git a/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch b/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch deleted file mode 100644 index 169906344f..0000000000 --- a/meta/recipes-support/boost/boost/0001-Apply-boost-1.62.0-no-forced-flags.patch.patch +++ /dev/null @@ -1,100 +0,0 @@ -From 8845a786598f1d9e83aa1b7d2966b0d1eb765ba0 Mon Sep 17 00:00:00 2001 -From: Christopher Larson <chris_larson@mentor.com> -Date: Tue, 13 Dec 2016 10:14:31 -0700 -Subject: [PATCH 1/3] Apply boost-1.62.0-no-forced-flags.patch - -Upstream-Status: Inappropriate -Signed-off-by: Christopher Larson <chris_larson@mentor.com> ---- - libs/log/build/Jamfile.v2 | 4 ++-- - libs/log/config/x86-ext/Jamfile.jam | 16 ++++++++-------- - libs/log/src/dump_avx2.cpp | 4 ++++ - libs/log/src/dump_ssse3.cpp | 4 ++++ - 4 files changed, 18 insertions(+), 10 deletions(-) - -diff --git a/libs/log/build/Jamfile.v2 b/libs/log/build/Jamfile.v2 -index 4abbdbc..b3016fc 100644 ---- a/libs/log/build/Jamfile.v2 -+++ b/libs/log/build/Jamfile.v2 -@@ -373,7 +373,7 @@ rule avx2-targets-cond ( properties * ) - } - else if <toolset>clang in $(properties) - { -- result = <cxxflags>"-mavx -mavx2" ; -+ result = <cxxflags> ; - } - else if <toolset>intel in $(properties) - { -@@ -383,7 +383,7 @@ rule avx2-targets-cond ( properties * ) - } - else - { -- result = <cxxflags>"-xCORE-AVX2 -fabi-version=0" ; -+ result = <cxxflags>"-fabi-version=0" ; - } - } - else if <toolset>msvc in $(properties) -diff --git a/libs/log/config/x86-ext/Jamfile.jam b/libs/log/config/x86-ext/Jamfile.jam -index 0e9695a..dcc394d 100644 ---- a/libs/log/config/x86-ext/Jamfile.jam -+++ b/libs/log/config/x86-ext/Jamfile.jam -@@ -15,19 +15,19 @@ project /boost/log/x86-extensions - - obj ssse3 : ssse3.cpp - : -- <toolset>gcc:<cxxflags>"-msse -msse2 -msse3 -mssse3" -- <toolset>clang:<cxxflags>"-msse -msse2 -msse3 -mssse3" -- <toolset>intel-linux:<cxxflags>"-xSSSE3" -- <toolset>intel-darwin:<cxxflags>"-xSSSE3" -+ <toolset>gcc:<cxxflags> -+ <toolset>clang:<cxxflags> -+ <toolset>intel-linux:<cxxflags> -+ <toolset>intel-darwin:<cxxflags> - <toolset>intel-win:<cxxflags>"/QxSSSE3" - ; - - obj avx2 : avx2.cpp - : -- <toolset>gcc:<cxxflags>"-mavx -mavx2 -fabi-version=0" -- <toolset>clang:<cxxflags>"-mavx -mavx2" -- <toolset>intel-linux:<cxxflags>"-xCORE-AVX2 -fabi-version=0" -- <toolset>intel-darwin:<cxxflags>"-xCORE-AVX2 -fabi-version=0" -+ <toolset>gcc:<cxxflags>"-fabi-version=0" -+ <toolset>clang:<cxxflags> -+ <toolset>intel-linux:<cxxflags>"-fabi-version=0" -+ <toolset>intel-darwin:<cxxflags>"-fabi-version=0" - <toolset>intel-win:<cxxflags>"/arch:CORE-AVX2" - <toolset>msvc:<cxxflags>"/arch:AVX" - ; -diff --git a/libs/log/src/dump_avx2.cpp b/libs/log/src/dump_avx2.cpp -index 4ab1250..610fc6d 100644 ---- a/libs/log/src/dump_avx2.cpp -+++ b/libs/log/src/dump_avx2.cpp -@@ -22,6 +22,10 @@ - #include <boost/cstdint.hpp> - #include <boost/log/detail/header.hpp> - -+#if !defined(__AVX2__) -+#error "AVX2 Unsupported!" -+#endif -+ - #if defined(__x86_64) || defined(__x86_64__) || \ - defined(__amd64__) || defined(__amd64) || \ - defined(_M_X64) -diff --git a/libs/log/src/dump_ssse3.cpp b/libs/log/src/dump_ssse3.cpp -index 1325b49..60d4112 100644 ---- a/libs/log/src/dump_ssse3.cpp -+++ b/libs/log/src/dump_ssse3.cpp -@@ -22,6 +22,10 @@ - #include <boost/cstdint.hpp> - #include <boost/log/detail/header.hpp> - -+#if !defined(__SSSE3__) -+#error "SSSE3 Unsupported!" -+#endif -+ - #if defined(__x86_64) || defined(__x86_64__) || \ - defined(__amd64__) || defined(__amd64) || \ - defined(_M_X64) --- -2.8.0 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 68d6e6417f..91ab53efd9 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,21 +1,23 @@ -From f4d3fad43d67808d71325ba0df1457555b9a0086 Mon Sep 17 00:00:00 2001 +From 8e1d30454afde37eaa3c593ec19d108cd5ed10d0 Mon Sep 17 00:00:00 2001 From: Alexander Kanavin <alex.kanavin@gmail.com> Date: Tue, 18 Dec 2018 15:42:57 +0100 -Subject: [PATCH] Don't set up arch/instruction-set flags, we do that ourselves +Subject: [PATCH] Don't set up arch/instruction-set flags, we do that + +ourselves Upstream-Status: Inappropriate Signed-off-by: Christopher Larson <chris_larson@mentor.com> Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> --- - tools/build/src/tools/gcc.jam | 132 ---------------------------------- - 1 file changed, 132 deletions(-) + tools/build/src/tools/gcc.jam | 139 ---------------------------------- + 1 file changed, 139 deletions(-) diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam -index b9bb9cf2a..c7e3cf3fe 100644 +index ff3209f7b..70cbc39a5 100644 --- a/tools/build/src/tools/gcc.jam +++ b/tools/build/src/tools/gcc.jam -@@ -1180,135 +1180,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + : +@@ -1217,142 +1217,3 @@ local rule cpu-flags ( toolset variable : architecture : instruction-set + : <architecture>$(architecture)/<instruction-set>$(instruction-set) : $(values) ; } @@ -65,7 +67,11 @@ index b9bb9cf2a..c7e3cf3fe 100644 -cpu-flags gcc OPTIONS : x86 : skylake : -march=skylake ; -cpu-flags gcc OPTIONS : x86 : skylake-avx512 : -march=skylake-avx512 ; -cpu-flags gcc OPTIONS : x86 : cannonlake : -march=skylake-avx512 -mavx512vbmi -mavx512ifma -msha ; --cpu-flags gcc OPTIONS : x86 : icelake : -march=icelake ; +-cpu-flags gcc OPTIONS : x86 : icelake-client : -march=icelake-client ; +-cpu-flags gcc OPTIONS : x86 : icelake-server : -march=icelake-server ; +-cpu-flags gcc OPTIONS : x86 : cascadelake : -march=skylake-avx512 -mavx512vnni ; +-cpu-flags gcc OPTIONS : x86 : cooperlake : -march=cooperlake ; +-cpu-flags gcc OPTIONS : x86 : tigerlake : -march=tigerlake ; -cpu-flags gcc OPTIONS : x86 : k6 : -march=k6 ; -cpu-flags gcc OPTIONS : x86 : k6-2 : -march=k6-2 ; -cpu-flags gcc OPTIONS : x86 : k6-3 : -march=k6-3 ; @@ -91,10 +97,12 @@ index b9bb9cf2a..c7e3cf3fe 100644 -cpu-flags gcc OPTIONS : x86 : btver1 : -march=btver1 ; -cpu-flags gcc OPTIONS : x86 : btver2 : -march=btver2 ; -cpu-flags gcc OPTIONS : x86 : znver1 : -march=znver1 ; +-cpu-flags gcc OPTIONS : x86 : znver2 : -march=znver2 ; -cpu-flags gcc OPTIONS : x86 : winchip-c6 : -march=winchip-c6 ; -cpu-flags gcc OPTIONS : x86 : winchip2 : -march=winchip2 ; -cpu-flags gcc OPTIONS : x86 : c3 : -march=c3 ; -cpu-flags gcc OPTIONS : x86 : c3-2 : -march=c3-2 ; +-cpu-flags gcc OPTIONS : x86 : c7 : -march=c7 ; -## -cpu-flags gcc OPTIONS : x86 : atom : -march=atom ; -# Sparc @@ -149,5 +157,6 @@ index b9bb9cf2a..c7e3cf3fe 100644 -cpu-flags gcc OPTIONS : s390x : zEC12 : -march=zEC12 ; -cpu-flags gcc OPTIONS : s390x : z13 : -march=z13 ; -cpu-flags gcc OPTIONS : s390x : z14 : -march=z14 ; +-cpu-flags gcc OPTIONS : s390x : z15 : -march=z15 ; -# AIX variant of RS/6000 & PowerPC -toolset.flags gcc AROPTIONS <address-model>64/<target-os>aix : "-X64" ; diff --git a/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch b/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch new file mode 100644 index 0000000000..78b19225d4 --- /dev/null +++ b/meta/recipes-support/boost/boost/0001-dont-setup-compiler-flags-m32-m64.patch @@ -0,0 +1,42 @@ +From 59402e3a61d14eb7ce8c2019ea1a87ad4bd28605 Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anuj.mittal@intel.com> +Date: Thu, 14 Nov 2019 10:13:53 +0800 +Subject: [PATCH] dont setup compiler flags -m32/-m64 + +We don't want these to be setup by boost as we pass our own flags. + +Upstream-Status: Inappropriate [OE-specific] + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +--- + tools/build/src/tools/gcc.jam | 14 -------------- + 1 file changed, 14 deletions(-) + +diff --git a/tools/build/src/tools/gcc.jam b/tools/build/src/tools/gcc.jam +index c7e3cf3..24486e0 100644 +--- a/tools/build/src/tools/gcc.jam ++++ b/tools/build/src/tools/gcc.jam +@@ -430,20 +430,6 @@ local rule compile-link-flags ( * ) + } + + { +- # Handle address-model +- compile-link-flags <target-os>aix/<address-model>32 : -maix32 ; +- compile-link-flags <target-os>aix/<address-model>64 : -maix64 ; +- +- compile-link-flags <target-os>hpux/<address-model>32 : -milp32 ; +- compile-link-flags <target-os>hpux/<address-model>64 : -mlp64 ; +- +- local generic-os = [ set.difference $(all-os) : aix hpux ] ; +- local arch = power sparc x86 ; +- compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>32 : -m32 ; +- compile-link-flags <target-os>$(generic-os)/<architecture>$(arch)/<address-model>64 : -m64 ; +-} +- +-{ + # Handle threading + local rule threading-flags ( * ) + { +-- +2.7.4 + diff --git a/meta/recipes-support/boost/boost/0001-fiber-libs-Define-SYS_futex-if-it-does-not-exist.patch b/meta/recipes-support/boost/boost/0001-fiber-libs-Define-SYS_futex-if-it-does-not-exist.patch new file mode 100644 index 0000000000..523568e9bc --- /dev/null +++ b/meta/recipes-support/boost/boost/0001-fiber-libs-Define-SYS_futex-if-it-does-not-exist.patch @@ -0,0 +1,54 @@ +From d6f7b6064dc91d1d5fa18554b40b14822ab7a32b Mon Sep 17 00:00:00 2001 +From: Khem Raj <raj.khem@gmail.com> +Date: Fri, 16 Oct 2020 11:13:22 -0700 +Subject: [PATCH] fiber,libs: Define SYS_futex if it does not exist + +__NR_futex is not defines by newer architectures e.g. arc, riscv32 as +they only have 64bit variant of time_t. Glibc defines SYS_futex interface based on +__NR_futex, since this is used in applications, such applications start +to fail to build for these newer architectures. This patch defines a +fallback to alias __NR_futex to __NR_futex_tim64 so SYS_futex keeps +working + +Upstream-Status: Pending + +Signed-off-by: Khem Raj <raj.khem@gmail.com> +--- + boost/fiber/detail/futex.hpp | 5 +++++ + libs/log/src/event.cpp | 4 ++++ + 2 files changed, 9 insertions(+) + +diff --git a/boost/fiber/detail/futex.hpp b/boost/fiber/detail/futex.hpp +index e64bd5990..16bee64f1 100644 +--- a/boost/fiber/detail/futex.hpp ++++ b/boost/fiber/detail/futex.hpp +@@ -17,6 +17,11 @@ extern "C" { + #include <linux/futex.h> + #include <sys/syscall.h> + } ++ ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++#define SYS_futex SYS_futex_time64 ++#endif ++ + #elif BOOST_OS_WINDOWS + #include <windows.h> + #endif +diff --git a/libs/log/src/event.cpp b/libs/log/src/event.cpp +index 5485154d7..2c7c0381f 100644 +--- a/libs/log/src/event.cpp ++++ b/libs/log/src/event.cpp +@@ -31,6 +31,10 @@ + #include <linux/futex.h> + #include <boost/memory_order.hpp> + ++#if !defined(SYS_futex) && defined(SYS_futex_time64) ++#define SYS_futex SYS_futex_time64 ++#endif ++ + // Some Android NDKs (Google NDK and older Crystax.NET NDK versions) don't define SYS_futex + #if defined(SYS_futex) + #define BOOST_LOG_SYS_FUTEX SYS_futex +-- +2.28.0 + diff --git a/meta/recipes-support/boost/boost/arm-intrinsics.patch b/meta/recipes-support/boost/boost/arm-intrinsics.patch deleted file mode 100644 index fe85c69a82..0000000000 --- a/meta/recipes-support/boost/boost/arm-intrinsics.patch +++ /dev/null @@ -1,55 +0,0 @@ -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/meta/recipes-support/boost/boost_1.71.0.bb b/meta/recipes-support/boost/boost_1.77.0.bb index 324b46f168..df8e08ad76 100644 --- a/meta/recipes-support/boost/boost_1.71.0.bb +++ b/meta/recipes-support/boost/boost_1.77.0.bb @@ -1,9 +1,9 @@ require boost-${PV}.inc require boost.inc -SRC_URI += "file://arm-intrinsics.patch \ - file://boost-CVE-2012-2677.patch \ +SRC_URI += "file://boost-CVE-2012-2677.patch \ file://boost-math-disable-pch-for-gcc.patch \ - file://0001-Apply-boost-1.62.0-no-forced-flags.patch.patch \ file://0001-Don-t-set-up-arch-instruction-set-flags-we-do-that-o.patch \ + file://0001-dont-setup-compiler-flags-m32-m64.patch \ + file://0001-fiber-libs-Define-SYS_futex-if-it-does-not-exist.patch \ " diff --git a/meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch b/meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch deleted file mode 100644 index c6dcee915e..0000000000 --- a/meta/recipes-support/boost/files/0001-Build-debug-version-of-bjam.patch +++ /dev/null @@ -1,38 +0,0 @@ -From 19c117c3d1388654da484e26afb3fb6c3e4181a9 Mon Sep 17 00:00:00 2001 -From: Daniel Klauer <daniel.klauer@gin.de> -Date: Tue, 30 Jul 2019 11:39:09 +0200 -Subject: [PATCH] Build debug version of bjam - -bjam is stripped by default, this causes QA warning while stripping it -from do_populate_sysroot(): - - WARNING: File '.../tmp/sysroots/x86_64-linux/usr/bin/bjam' \ - from bjam-native was already stripped, \ - this will prevent future debugging! - -The JAM scripts allow to build unstripped version with '--debug'. Just -build and install the bjam.debug to stop bjam from being stripped in -compile step. - -Upstream-Status: Inappropriate [configuration] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - bootstrap.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/bootstrap.sh b/bootstrap.sh -index ca0b08d58..87f38dcf2 100755 ---- a/bootstrap.sh -+++ b/bootstrap.sh -@@ -223,7 +223,7 @@ rm -f config.log - if test "x$BJAM" = x; then - $ECHO -n "Building Boost.Build engine with toolset $TOOLSET... " - pwd=`pwd` -- (cd "$my_dir/tools/build/src/engine" && ./build.sh "$TOOLSET") > bootstrap.log 2>&1 -+ (cd "$my_dir/tools/build/src/engine" && ./build.sh "$TOOLSET" --debug) > bootstrap.log 2>&1 - if [ $? -ne 0 ]; then - echo - echo "Failed to build Boost.Build build engine" --- -2.17.1 - diff --git a/meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch b/meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch deleted file mode 100644 index 4c6ef2ed84..0000000000 --- a/meta/recipes-support/boost/files/0001-build.sh-use-DNDEBUG-also-in-debug-builds.patch +++ /dev/null @@ -1,27 +0,0 @@ -From 2afd025997a57794ce24e07e914b461dfea6ba5f Mon Sep 17 00:00:00 2001 -From: Alexander Kanavin <alex.kanavin@gmail.com> -Date: Mon, 26 Aug 2019 16:04:16 +0200 -Subject: [PATCH] build.sh: use -DNDEBUG also in debug builds - -Without it, there is a significant performance regression -when running 'bjam install'. - -Upstream-Status: Inappropriate [configuration] -Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com> ---- - tools/build/src/engine/build.sh | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/tools/build/src/engine/build.sh b/tools/build/src/engine/build.sh -index a1e4cd335..64e0a4c80 100755 ---- a/tools/build/src/engine/build.sh -+++ b/tools/build/src/engine/build.sh -@@ -436,7 +436,7 @@ case $B2_OS in - ;; - esac - --if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG}" -+if check_debug_build "$@" ; then B2_CXXFLAGS="${B2_CXXFLAGS_DEBUG} -DNDEBUG" - else B2_CXXFLAGS="${B2_CXXFLAGS_RELEASE} -DNDEBUG" - fi - echo_run ${B2_CXX} ${CXXFLAGS} ${B2_CXXFLAGS} ${B2_SOURCES} -o b2 |