summaryrefslogtreecommitdiffstats
path: root/meta/classes/autotools.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-12 14:50:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2015-02-13 14:49:36 +0000
commitcefc40389e3185c3728c8154dae602a4a11e2f55 (patch)
tree3677563d0e8e9d535980b6f4f43a014e55e9972b /meta/classes/autotools.bbclass
parent231d4a9d3d89af4b1b5f6ea439c630e4cac82079 (diff)
downloadpoky-cefc40389e3185c3728c8154dae602a4a11e2f55.tar.gz
autotools/siteinfo: Avoid races over siteinfo files
If a siteinfo enabled tasks re-executes at the wrong moment whilst something else is in do_configure, the _config files can be removed which upsets autoconf and causes build failures. Use the same approach as we do for dealing with the aclocal files. We already parse the manifests so look out any *_config files and if so, copy them, then reference the copy from siteinfo instead. This has the advantage of also being more deterministic. [YOCTO #7101] (From OE-Core rev: c8b7aad133c3e3319345d50f85a91cbd5116f842) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/autotools.bbclass')
-rw-r--r--meta/classes/autotools.bbclass7
1 files changed, 6 insertions, 1 deletions
diff --git a/meta/classes/autotools.bbclass b/meta/classes/autotools.bbclass
index 402ee1bf01..046e83dc9b 100644
--- a/meta/classes/autotools.bbclass
+++ b/meta/classes/autotools.bbclass
@@ -27,7 +27,7 @@ inherit siteinfo
27 27
28# Space separated list of shell scripts with variables defined to supply test 28# Space separated list of shell scripts with variables defined to supply test
29# results for autoconf tests we cannot run at build time. 29# results for autoconf tests we cannot run at build time.
30export CONFIG_SITE = "${@siteinfo_get_files(d)}" 30export CONFIG_SITE = "${@siteinfo_get_files(d, False)}"
31 31
32acpaths = "default" 32acpaths = "default"
33EXTRA_AUTORECONF = "--exclude=autopoint" 33EXTRA_AUTORECONF = "--exclude=autopoint"
@@ -187,6 +187,7 @@ python autotools_copy_aclocals () {
187 #bb.warn(str(configuredeps2)) 187 #bb.warn(str(configuredeps2))
188 188
189 cp = [] 189 cp = []
190 siteconf = []
190 for c in configuredeps: 191 for c in configuredeps:
191 if c.endswith("-native"): 192 if c.endswith("-native"):
192 manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c) 193 manifest = d.expand("${SSTATE_MANIFESTS}/manifest-${BUILD_ARCH}-%s.populate_sysroot" % c)
@@ -201,6 +202,8 @@ python autotools_copy_aclocals () {
201 for l in f: 202 for l in f:
202 if "/aclocal/" in l and l.strip().endswith(".m4"): 203 if "/aclocal/" in l and l.strip().endswith(".m4"):
203 cp.append(l.strip()) 204 cp.append(l.strip())
205 elif "config_site.d/" in l:
206 cp.append(l.strip())
204 except: 207 except:
205 bb.warn("%s not found" % manifest) 208 bb.warn("%s not found" % manifest)
206 209
@@ -208,6 +211,8 @@ python autotools_copy_aclocals () {
208 t = os.path.join(aclocaldir, os.path.basename(c)) 211 t = os.path.join(aclocaldir, os.path.basename(c))
209 if not os.path.exists(t): 212 if not os.path.exists(t):
210 os.symlink(c, t) 213 os.symlink(c, t)
214
215 d.setVar("CONFIG_SITE", siteinfo_get_files(d, False))
211} 216}
212autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA" 217autotools_copy_aclocals[vardepsexclude] += "MACHINE SDK_ARCH BUILD_ARCH SDK_OS BB_TASKDEPDATA"
213 218