boost: move the build directory outside of S

Instead of manually creating and deleting build directories, follow the idioms
by setting B to WORKDIR/build, setting do_configure[cleandirs], and using ${B}
where appropriate.

(From OE-Core rev: 6ee1b1e6d65214ab32030ee4b37997f8a9871f25)

Signed-off-by: Ross Burton <ross.burton@arm.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Ross Burton
2020-09-29 23:16:38 +01:00
committed by Richard Purdie
parent e1f186da61
commit 6817a1b683

View File

@@ -7,6 +7,9 @@ CVE_PRODUCT = "boost:boost"
ARM_INSTRUCTION_SET_armv4 = "arm"
ARM_INSTRUCTION_SET_armv5 = "arm"
B = "${WORKDIR}/build"
do_configure[cleandirs] = "${B}"
BOOST_LIBS = "\
atomic \
chrono \
@@ -146,7 +149,7 @@ 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}'
@@ -161,6 +164,7 @@ 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.
@@ -184,8 +188,9 @@ do_configure() {
}
do_compile() {
rm -rf ${S}/${TARGET_SYS}
bjam ${BJAM_OPTS} --prefix=${prefix} \
cd ${S}
bjam ${BJAM_OPTS} \
--prefix=${prefix} \
--exec-prefix=${exec_prefix} \
--libdir=${libdir} \
--includedir=${includedir} \
@@ -193,6 +198,7 @@ do_compile() {
}
do_install() {
cd ${S}
bjam ${BJAM_OPTS} \
--libdir=${D}${libdir} \
--includedir=${D}${includedir} \