boost: build a standalone boost.build
PATCH 1/3 boost: build a standalone boost.build
Boost is a huge unirepo made from multiple submodules. To bootstrap it we need boost.build (previously bjam) which is also available as a solo repository. This smaller repository can unpack/build/package faster than the Boost unirepo can unpack.
Rename the recipe to the current name of Boost.Build that installs a b2 binary, use the solo repository, and update the Boost recipe to use the b2 binary instead of bjam.
--- meta/conf/distro/include/maintainers.inc | 2 +- .../boost/bjam-native_1.74.0.bb | 18 --------------- .../boost/boost-build-native_4.3.0.bb | 23 +++++++++++++++++++ meta/recipes-support/boost/boost.inc | 8 +++---- 4 files changed, 28 insertions(+), 23 deletions(-) delete mode 100644 meta/recipes-support/boost/bjam-native_1.74.0.bb create mode 100644 meta/recipes-support/boost/boost-build-native_4.3.0.bb
meta/conf/distro/include/maintainers.inc +1 -1
@@ -70,12 +70,12 @@ RECIPE_MAINTAINER_pn-binutils-cross-canadian-${TRANSLATED_TARGET_ARCH} = "Khem R RECIPE_MAINTAINER_pn-binutils-cross-testsuite = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-binutils-crosssdk-${SDK_SYS} = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-bison = "Chen Qi <[email protected]>" -RECIPE_MAINTAINER_pn-bjam-native = "Alexander Kanavin <[email protected]>" RECIPE_MAINTAINER_pn-blktool = "Yi Zhao <[email protected]>" RECIPE_MAINTAINER_pn-blktrace = "Alexander Kanavin <[email protected]>" RECIPE_MAINTAINER_pn-bluez5 = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-bmap-tools = "Anuj Mittal <[email protected]>" RECIPE_MAINTAINER_pn-boost = "Alexander Kanavin <[email protected]>" +RECIPE_MAINTAINER_pn-boost-build-native = "Alexander Kanavin <[email protected]>" RECIPE_MAINTAINER_pn-bootchart2 = "Alexander Kanavin <[email protected]>" RECIPE_MAINTAINER_pn-bsd-headers = "Khem Raj <[email protected]>" RECIPE_MAINTAINER_pn-btrfs-tools = "Wang Mingyu <[email protected]>"
meta/recipes-support/boost/bjam-native_1.74.0.bb deleted +0 -18
@@ -1,18 +0,0 @@ -require boost-${PV}.inc - -SUMMARY = "Portable Boost.Jam build tool for boost" -SECTION = "devel" - -inherit native - -do_compile() { - ./bootstrap.sh --with-toolset=gcc -} - -do_install() { - install -d ${D}${bindir}/ - install b2 ${D}${bindir}/bjam -} - -# The build is either release mode (pre-stripped) or debug (-O0). -INSANE_SKIP_${PN} = "already-stripped"
meta/recipes-support/boost/boost-build-native_4.3.0.bb new file +23 -0
@@ -0,0 +1,23 @@ +SUMMARY = "Boost.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 = "632ea768f3eb225b4472c5ed6d20afee708724ad" + +inherit native + +S = "${WORKDIR}/git" + +do_compile() { + ./bootstrap.sh +} + +do_install() { + ./b2 install --prefix=${prefix} staging-prefix=${D}${prefix} +} + +# The build is either release mode (pre-stripped) or debug (-O0). +INSANE_SKIP_${PN} = "already-stripped"
meta/recipes-support/boost/boost.inc +4 -4
@@ -1,6 +1,6 @@ SUMMARY = "Free peer-reviewed portable C++ source libraries" SECTION = "libs" -DEPENDS = "bjam-native zlib bzip2" +DEPENDS = "boost-build-native zlib bzip2" CVE_PRODUCT = "boost:boost"
@@ -180,7 +180,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
@@ -189,7 +189,7 @@ do_configure() { do_compile() { cd ${S} - bjam ${BJAM_OPTS} \ + b2 ${BJAM_OPTS} \ --prefix=${prefix} \ --exec-prefix=${exec_prefix} \ --libdir=${libdir} \
@@ -199,7 +199,7 @@ do_compile() { do_install() { cd ${S} - bjam ${BJAM_OPTS} \ + b2 ${BJAM_OPTS} \ --libdir=${D}${libdir} \ --includedir=${D}${includedir} \ install
Signature · 1 line
2.25.1
PATCH 2/3 boost: don't specify gcc version
From: Ross Burton <[email protected]>
There's no need to specify an ancient GCC version here as Boost will probe it.
--- meta/recipes-support/boost/boost.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-support/boost/boost.inc +1 -1
@@ -169,7 +169,7 @@ do_configure() { # 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
Signature · 1 line
2.25.1
Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
Quoted 16 lines · Ross Burton
From: Ross Burton <[email protected]>
There's no need to specify an ancient GCC version here as Boost will probe it.
Signed-off-by Ross Burton <[email protected]>--- meta/recipes-support/boost/boost.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)meta/recipes-support/boost/boost.inc +0
-0
meta/recipes-support/boost/boost.inc do_configure() { · line 173
Quoted 6 lines
meta/recipes-support/boost/boost.inc +1
-1@@ -169,7 +169,7 @@ do_configure() { # 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
does it probe the version from cross compiler now and not the host compiler ?
Quoted 8 lines
meta/recipes-support/boost/boost.inc +0
-1# 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 --2.25.1
Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
Quoted 1 line · Khem Raj
does it probe the version from cross compiler now and not the host compiler ?
I shall triple check :)
Ross
Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
From boost's log.do_compile:
notice: using rc compiler :: <toolset>gcc-10.2.0 :: as
On my host:
$ gcc --version gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0
Ross
Quoted 7 lines · Ross Burton
Quoted 1 line · Khem Raj
does it probe the version from cross compiler now and not the host compiler ?
I shall triple check :)
Ross
Re: [OE-core] [PATCH 2/3] boost: don't specify gcc version
Thanks should be good.
Quoted 18 lines · Ross Burton
From boost's log.do_compile:
notice: using rc compiler :: <toolset>gcc-10.2.0 :: asOn my host:
$ gcc --version gcc (Ubuntu 9.3.0-10ubuntu2) 9.3.0Ross
Quoted 7 lines · Ross Burton
Quoted 1 line · Khem Raj
does it probe the version from cross compiler now and not the host compiler ?
I shall triple check :)
Ross
PATCH 3/3 boost: consolidate and update library list
In reply to Ross BurtonAdd some new libraries to the list (fiber, headers, type_erasure).
Move context/coroutine to the list instead of using overrides as it builds everywhere I can test it.
Remove the mips16e override for wave as Boost fails so dramatically with mips16e enabled that this isn't even close to a fix. Someone who cares can fix this properly.
--- meta/recipes-support/boost/boost.inc | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-)
meta/recipes-support/boost/boost.inc +6 -12
@@ -14,11 +14,15 @@ BOOST_LIBS = "\ atomic \ chrono \ container \ + context \ contract \ + coroutine \ date_time \ exception \ + fiber \ filesystem \ graph \ + headers \ iostreams \ log \ math \
@@ -27,23 +31,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"
Signature · 1 line
2.25.1