bitbake.conf: use ${TCMODE}-${TCLIBC} directory for CACHE
This is something I was sitting on for long time, because last time it was too late to get it merged in 3.1 and then I forgot to send it when master got open for 3.2 changes :/. And now I'm again a bit late for 3.2..
Here are some more details from #yocto IRC channel log from 2020-03-09
22:02 < JaMa> RP: memory check for you, it's about commit from 2011/2009 :) do you know why we have 2 different CACHE settings in default setup? 22:02 < JaMa> meta/conf/bitbake.conf:CACHE = "${TMPDIR}/cache${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}"
22:02 < JaMa> meta/conf/distro/defaultsetup.conf:CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + str(bb.data.getVar('MACHINE', d, 1))][bool(bb.data.getVar('MACHINE', d, 1))]}${@['', '/' + str(bb.data.getVar('SDKMACHINE', d, 1))][bool(bb.data.getVar('SDKMACHINE', d, 1))]}"
22:03 < JaMa> 2nd was introduced in 2011 with
http://git.openembedded.org/openembedded-core/commit/?id=c0a148077ae27a1ef57c55ac22953c68d001af57
22:03 < JaMa> any objection to update the 1st one and drop 2nd? 22:04 < JaMa> 2009 was last "functional" change in the 1st one (other than getVar API change updates later twice)
http://git.openembedded.org/openembedded-core/commit/?id=1d4f93e8f63395220da652bae055acde11544577
22:04 < RP> JaMa: presumably its because TCMODE and TCLIBC are nodistro specific
22:05 < RP> JaMa: we've had wider adoption of that convention since 22:05 < RP> JaMa: if someone had a summy nodistro conf file, it would break with TCMODE/TCLIBC not in bitbake.conf
22:06 < RP> JaMa: no object to simplifying this though
22:06 < RP> s/summy/dummy/
22:06 < JaMa> ok, will do that in 3.2
22:07 < JaMa> TCLIBC is used in quite a few places now, TCMODE only in meta/conf/local.conf.sample.extended + defaultsetup.conf
22:07 < RP> JaMa: right, TCLIBC is pretty much required now
Quoted 89 lines · Martin Jansa via lists.openembedded.org
* move TCMODE and TCLIBC from defaultsetup.conf to bitbake.conf
* set CACHE as it was in defaultsetup.conf and drop it from defaultsetup.conf
* most if not all DISTROs are now including defaultsetup.conf and TCLIBC is pretty much expected to be always set correctly, e.g.:
meta/recipes-core/systemd/systemd_243.2.bb: ifd.getVar('TCLIBC')==
"musl":
meta/recipes-devtools/gcc/gcc-runtime.inc: if [ "${TCLIBC}" !=
"glibc" ]; then
meta/recipes-devtools/gcc/libgcc.inc: if [ "${TCLIBC}" != "glibc" ];
then
meta/recipes-devtools/icecc-toolchain/nativesdk-icecc-toolchain_0.1.bb:
ENV_NAME="${DISTRO}-${TCLIBC}-${SDK_ARCH}-@TARGET_PREFIX @${DISTRO_VERSION}.tar.gz"
meta/recipes-devtools/valgrind/valgrind_3.15.0.bb:RRECOMMENDS_${PN} +=
"${TCLIBC}-dbg"
meta/recipes-kernel/linux/kernel-devsrc.bb:RDEPENDS_${PN} = "bc python3
flex bison ${TCLIBC}-utils"meta/classes/buildhistory.bbclass:BUILDHISTORY_DIR_IMAGE =
"${BUILDHISTORY_DIR}/images/${MACHINE_ARCH}/${TCLIBC}/${IMAGE_BASENAME}"
meta/classes/cross-canadian.bbclass: ifd.getVar("TCLIBC")in [
'baremetal', 'newlib' ]:
meta/classes/kernel.bbclass: tclibc =d.getVar('TCLIBC')
meta/classes/toaster.bbclass:BUILDHISTORY_DIR_IMAGE_BASE=e.data.expand("%s/images/${MACHINE_ARCH}/${TCLIBC}/"% BUILDHISTORY_DIR)Signed-off-by Martin Jansa <[email protected]>--- meta/conf/bitbake.conf | 5 ++++- meta/conf/distro/defaultsetup.conf | 5 ----- 2 files changed, 4 insertions(+), 6 deletions(-)meta/conf/bitbake.conf +0
-0@@ -357,8 +357,11 @@ FILESYSTEM_PERMS_TABLES ?= "${@'files/fs-perms.txt'if oe.types.boolean(d.getVar
# General work and output directories for the build system.
##################################################################meta/conf/bitbake.conf +2
-1+TCMODE ?= "default" +TCLIBC ?= "glibc" TMPDIR ?= "${TOPDIR}/tmp" -CACHE = "${TMPDIR}/cache${@['', '/' +str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
meta/conf/bitbake.conf +2
-0+ +CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' +str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}"
# The persistent cache should be shared by all buildsPERSISTENT_DIR= "${TOPDIR}/cache"
LOG_DIR= "${TMPDIR}/log"meta/conf/distro/defaultsetup.conf +0
-4@@ -3,10 +3,7 @@ include conf/distro/include/default-versions.inc include conf/distro/include/default-distrovars.inc include conf/distro/include/maintainers.inc -TCMODE ?= "default" require conf/distro/include/tcmode-${TCMODE}.inc - -TCLIBC ?= "glibc" require conf/distro/include/tclibc-${TCLIBC}.inc require conf/distro/include/uninative-flags.inc@@ -15,8 +12,6 @@ require conf/distro/include/uninative-flags.inc TCLIBCAPPEND ?= "-${TCLIBC}" TMPDIR .= "${TCLIBCAPPEND}" -CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' +str(d.getVar('MACHINE'))][bool(d.getVar('MACHINE'))]}${@['', '/' + str(d.getVar('SDKMACHINE'))][bool(d.getVar('SDKMACHINE'))]}" -
USER_CLASSES?= ""
PACKAGE_CLASSES?= "package_ipk"
INHERIT_BLACKLIST= "blacklist"
--
2.25.1