summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-11 15:22:29 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-09-12 15:13:40 +0100
commit8b9b1ab42e6e3226fc06818ec3dd186b6f81acad (patch)
tree3af96d24dd1d1979fb18ae20ffcb1742000e0bbf /meta
parentc8e3e0149a23ee7f1477a73821d09e68883d988a (diff)
downloadpoky-8b9b1ab42e6e3226fc06818ec3dd186b6f81acad.tar.gz
autotools.bbclass: Add functionality to force a clean of ${B} when reconfiguring (and ${S} != ${B})
Unfortunately whilst rerunning configure and make against a project will mostly work there are situations where it does not correctly do the right thing. In particular, eglibc and gcc will fail out with errors where settings do not match a previously built configuration. It could be argued they are broken but the situation is what it is. There is the possibility of more subtle errors too. This patch adds removal of the build directory (${B}) when configure is rerunning, the sstate checksum for do_configure has changed and ${S} != ${B}. We could simply use a stamp but saving out the previous configuration checksum adds some data at no real overhead. If we find there are things where we want to disable this behaviour with CONFIGURESTAMPFILE = "" in the recipe, or users could disable it globally. [YOCTO #2774] [YOCTO #2848] This is particularly helpful for eglibc and gcc which use split builds by default and are a particular source of reconfigure type problems. (From OE-Core rev: f15f61af77cc4e52a037f509f8e49e1ea530cf35) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/autotools.bbclass21
1 files changed, 21 insertions, 0 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 4c4bf8775d..a5997c55e0 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -89,6 +89,27 @@ oe_runconf () {
89 89
90AUTOTOOLS_AUXDIR ?= "${S}" 90AUTOTOOLS_AUXDIR ?= "${S}"
91 91
92CONFIGURESTAMPFILE = "${WORKDIR}/configure.sstate"
93
94autotools_preconfigure() {
95 if [ -n "${CONFIGURESTAMPFILE}" -a -e "${CONFIGURESTAMPFILE}" ]; then
96 if [ "`cat ${CONFIGURESTAMPFILE}`" != "${BB_TASKHASH}" -a "${S}" != "${B}" ]; then
97 echo "Previously configured separate build directory detected, cleaning ${B}"
98 rm -rf ${B}
99 mkdir ${B}
100 fi
101 fi
102}
103
104autotools_postconfigure(){
105 if [ -n "${CONFIGURESTAMPFILE}" ]; then
106 echo ${BB_TASKHASH} > ${CONFIGURESTAMPFILE}
107 fi
108}
109
110do_configure[prefuncs] += "autotools_preconfigure"
111do_configure[postfuncs] += "autotools_postconfigure"
112
92autotools_do_configure() { 113autotools_do_configure() {
93 case ${PN} in 114 case ${PN} in
94 autoconf*) 115 autoconf*)