correctly clean ${B] when externalsrc and {B}=${S}
cover correctly clean ${B] when externalsrc and {B}=${S}
This patchset aims in fixing a build failure when B=S and externalsrc is used. The build failure was caused by build artefacts from a previous build not being cleaned up when MACHINE was changed.
[YOCTO #8950]
The following changes since commit 2a6e061712cfe9cb4738806a0c351a64e0d30144:
cmake: update to 3.4.2 (2016-01-26 22:48:57 +0000)
are available in the git repository at:
contrib-git marquiz/externalsrc
for you to fetch changes up to 58bb2b3bd3195af2715e8dd594326dfa73fc72e9:
externalsrc: use shared CONFIGURESTAMPFILE if B=S (2016-01-29 16:53:19 +0200)
Markus Lehtonen (3):
autotools.bbclass: use oe_runmake instead of ${MAKE} Make sure that the directory for CONFIGURESTAMPFILE exists
externalsrc: use shared CONFIGURESTAMPFILE if B=S
meta/classes/autotools.bbclass | 4 ++-- meta/classes/base.bbclass | 1 + meta/classes/externalsrc.bbclass | 11 +++++++++++ 3 files changed, 14 insertions(+), 2 deletions(-)
Signature · 1 line
2.1.4
PATCH 1/3 autotools.bbclass: use oe_runmake instead of ${MAKE}
Use oe_runmake like in base.bbclass so that EXTRA_OEMAKE will be respected.
--- meta/classes/autotools.bbclass | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
meta/classes/autotools.bbclass +1 -2
@@ -112,8 +112,7 @@ autotools_preconfigure() { # regenerate them even if CFLAGS/LDFLAGS are different cd ${S} if [ "${CLEANBROKEN}" != "1" -a \( -e Makefile -o -e makefile -o -e GNUmakefile \) ]; then - echo "Running \"${MAKE} clean\" in ${S}" - ${MAKE} clean + oe_runmake clean fi find ${S} -ignore_readdir_race -name \*.la -delete fi
Signature · 1 line
2.1.4
PATCH 2/3 Make sure that the directory for CONFIGURESTAMPFILE exists
In reply to Markus Lehtonen--- meta/classes/autotools.bbclass | 1 + meta/classes/base.bbclass | 1 + 2 files changed, 2 insertions(+)
meta/classes/autotools.bbclass +1 -0
@@ -122,6 +122,7 @@ autotools_preconfigure() { autotools_postconfigure(){ if [ -n "${CONFIGURESTAMPFILE}" ]; then + mkdir -p `dirname ${CONFIGURESTAMPFILE}` echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} fi }
meta/classes/base.bbclass +1 -0
@@ -292,6 +292,7 @@ base_do_configure() { fi fi if [ -n "${CONFIGURESTAMPFILE}" ]; then + mkdir -p `dirname ${CONFIGURESTAMPFILE}` echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE} fi }
Signature · 1 line
2.1.4
PATCH 3/3 externalsrc: use shared CONFIGURESTAMPFILE if B=S
In reply to Markus LehtonenExternal 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]
--- meta/classes/externalsrc.bbclass | 11 +++++++++++ 1 file changed, 11 insertions(+)
meta/classes/externalsrc.bbclass +11 -0
@@ -85,6 +85,17 @@ python () { # Ensure compilation happens every time d.setVarFlag('do_compile', 'nostamp', '1') + + # If B=S the same builddir is used even for different architectures. + # Thus, use a shared CONFIGURESTAMPFILE so that change of do_configure + # task hash is correctly detected if e.g. MACHINE changes. In addition, + # do_configure needs to depend on the stamp file so that the task is + # re-run when the stamp was changed since the last run on this + # architecture. + if d.getVar('S', True) == d.getVar('B', True): + configstamp = '${TMPDIR}/work-shared/${PN}/${EXTENDPE}${PV}-${PR}/configure.sstate' + d.setVar('CONFIGURESTAMPFILE', configstamp) + d.setVarFlag('do_configure', 'file-checksums', configstamp + ':True') } python externalsrc_compile_prefunc() {
Signature · 1 line
2.1.4