summaryrefslogtreecommitdiffstats
path: root/meta/classes/externalsrc.bbclass
diff options
context:
space:
mode:
authorMarkus Lehtonen <markus.lehtonen@linux.intel.com>2016-01-29 17:04:31 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-01-31 13:29:48 +0000
commitc43da123335be598931a2977570b4106846b33f5 (patch)
tree42462b5f915633a488701c003e4ad433e6ef51d0 /meta/classes/externalsrc.bbclass
parentc6b8227083d8380b79d19573432befb97ce9b299 (diff)
downloadpoky-c43da123335be598931a2977570b4106846b33f5.tar.gz
externalsrc: use shared CONFIGURESTAMPFILE if B=S
External source tree is used as the builddir even for different architectures in case ${B}=${S}. This may cause problems if MACHINE is changed as do_configure is not being re-run (which would run make clean). This patches changes externalsrc to use a common (per-recipe) CONFIGURESTAMPFILE under 'work-shared' if ${B}=${S}. In addition, do_configure will depend on changes of this stamp file. As a result, do_configure is re-run and the build dir is cleaned correctly if a rebuild for different MACHINE is done. [YOCTO #8950] (From OE-Core rev: f44f12af346888bdeb3ae01a275cb5dd4396b505) Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/externalsrc.bbclass')
-rw-r--r--meta/classes/externalsrc.bbclass11
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/externalsrc.bbclass b/meta/classes/externalsrc.bbclass
index f7ed66d8c6..be0fe55d5f 100644
--- a/meta/classes/externalsrc.bbclass
+++ b/meta/classes/externalsrc.bbclass
@@ -85,6 +85,17 @@ python () {
85 85
86 # Ensure compilation happens every time 86 # Ensure compilation happens every time
87 d.setVarFlag('do_compile', 'nostamp', '1') 87 d.setVarFlag('do_compile', 'nostamp', '1')
88
89 # If B=S the same builddir is used even for different architectures.
90 # Thus, use a shared CONFIGURESTAMPFILE so that change of do_configure
91 # task hash is correctly detected if e.g. MACHINE changes. In addition,
92 # do_configure needs to depend on the stamp file so that the task is
93 # re-run when the stamp was changed since the last run on this
94 # architecture.
95 if d.getVar('S', True) == d.getVar('B', True):
96 configstamp = '${TMPDIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}/configure.sstate'
97 d.setVar('CONFIGURESTAMPFILE', configstamp)
98 d.setVarFlag('do_configure', 'file-checksums', configstamp + ':True')
88} 99}
89 100
90python externalsrc_compile_prefunc() { 101python externalsrc_compile_prefunc() {