summaryrefslogtreecommitdiffstats
path: root/meta/classes/toolchain-scripts.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-21 12:47:02 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-09-23 13:49:11 +0100
commit3dfd4ed0ef61daa55745b3ab378593e653562a30 (patch)
treef8ba443877d58a480681a9d975221eb9fa2f4ab1 /meta/classes/toolchain-scripts.bbclass
parent282d596b8cc81d650b6d20c6131fdc236bad2c20 (diff)
downloadpoky-3dfd4ed0ef61daa55745b3ab378593e653562a30.tar.gz
siteinfo/autotools: Ensure task checksums reflect site files
Currently, if you change the site files, nothing rebuilds since they are not accounted for in task checksums. They could/should be through the file-checksums task flag. We need to cache all the files looked for, whether the exist or not so that if they do exist and didn't, the checksum also changes. This gets complicated by the need to clean out hardcoded build paths from the variable and that other layers can have site files. This patch adds this functionality. A new variable, SITEINFO_PATHVARS is added which controls which substitutions to make on the file-checksum values to remove the hardcoded paths. Layers adding site files will need to set this to a variable that has the layer path in it and is excluded from task hashes (COREBASE is the one the core layer uses). This patch will cause yocto-check-layer to fail for some layers where site files are added yet the layer isn't a machine specific layer. This is arguable correct since these additional site files apply to all recipes and things from a layer like core could be changed by such changes so it is right they should rebuild. There is a determinism issue potentially there if not. meta-openembedded does have some such references but looking at them they should move to core or likely just be removed as most look obsolete anyway. [YOCTO #13729] (From OE-Core rev: 29daffc2410f06f36b779d5bf1fd1ef6e900ca8f) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/toolchain-scripts.bbclass')
-rw-r--r--meta/classes/toolchain-scripts.bbclass5
1 files changed, 3 insertions, 2 deletions
diff --git a/meta/classes/toolchain-scripts.bbclass b/meta/classes/toolchain-scripts.bbclass
index 479f3b706e..fb6261c91d 100644
--- a/meta/classes/toolchain-scripts.bbclass
+++ b/meta/classes/toolchain-scripts.bbclass
@@ -65,6 +65,7 @@ toolchain_create_sdk_env_script () {
65 65
66# This function creates an environment-setup-script in the TMPDIR which enables 66# This function creates an environment-setup-script in the TMPDIR which enables
67# a OE-core IDE to integrate with the build tree 67# a OE-core IDE to integrate with the build tree
68# Caller must ensure CONFIG_SITE is setup
68toolchain_create_tree_env_script () { 69toolchain_create_tree_env_script () {
69 script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS} 70 script=${TMPDIR}/environment-setup-${REAL_MULTIMACH_TARGET_SYS}
70 rm -f $script 71 rm -f $script
@@ -73,7 +74,7 @@ toolchain_create_tree_env_script () {
73 echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script 74 echo 'export PATH=${STAGING_DIR_NATIVE}/usr/bin:${STAGING_BINDIR_TOOLCHAIN}:$PATH' >> $script
74 echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script 75 echo 'export PKG_CONFIG_SYSROOT_DIR=${PKG_CONFIG_SYSROOT_DIR}' >> $script
75 echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script 76 echo 'export PKG_CONFIG_PATH=${PKG_CONFIG_PATH}' >> $script
76 echo 'export CONFIG_SITE="${@siteinfo_get_files(d)}"' >> $script 77 echo 'export CONFIG_SITE="${CONFIG_SITE}"' >> $script
77 echo 'export SDKTARGETSYSROOT=${STAGING_DIR_TARGET}' >> $script 78 echo 'export SDKTARGETSYSROOT=${STAGING_DIR_TARGET}' >> $script
78 echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script 79 echo 'export OECORE_NATIVE_SYSROOT="${STAGING_DIR_NATIVE}"' >> $script
79 echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script 80 echo 'export OECORE_TARGET_SYSROOT="${STAGING_DIR_TARGET}"' >> $script
@@ -161,7 +162,7 @@ EOF
161} 162}
162 163
163#we get the cached site config in the runtime 164#we get the cached site config in the runtime
164TOOLCHAIN_CONFIGSITE_NOCACHE = "${@siteinfo_get_files(d)}" 165TOOLCHAIN_CONFIGSITE_NOCACHE = "${@' '.join(siteinfo_get_files(d)[0])}"
165TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d" 166TOOLCHAIN_CONFIGSITE_SYSROOTCACHE = "${STAGING_DIR}/${MLPREFIX}${MACHINE}/${target_datadir}/${TARGET_SYS}_config_site.d"
166TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses" 167TOOLCHAIN_NEED_CONFIGSITE_CACHE ??= "virtual/${MLPREFIX}libc ncurses"
167DEPENDS += "${TOOLCHAIN_NEED_CONFIGSITE_CACHE}" 168DEPENDS += "${TOOLCHAIN_NEED_CONFIGSITE_CACHE}"