summaryrefslogtreecommitdiffstats
path: root/meta/classes
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2018-09-27 16:48:53 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-27 23:41:41 +0100
commit2d83a6c579a71e701c4a3c1c5f3c97802bf9576c (patch)
tree6c1e48d5e0772c642d90e37f8341b69747f72279 /meta/classes
parentcbad6ad071a084c6f3c5f915b702889c4f666406 (diff)
downloadpoky-2d83a6c579a71e701c4a3c1c5f3c97802bf9576c.tar.gz
nativesdk.bbclass: set consistent staging dirs regardless of multilib
For now, the RECIPE_SYSROOT of nativesdk recipes is ${WORKDIR}/recipe-sysroot if multilib is disabled and ${WORKDIR}/nativesdk-recipe-sysroot if multilib is enabled. And it's causing chaos. Problems I've met include: 1) 'File Exists' error when doing extend_recipe_sysroot 2) Rebuilding failure about cmake based nativesdk recipes if toggling multilib In nativesdk.bbclass, We've set MULTILIBS to be "", and we've changed MLPREFIX to be 'nativesdk-', I think we should also set consistent RECIPE_SYSROOT to be ${WORKDIR}/recipe-sysroot. Below is an example showing why previous settings will cause do_prepare_recipe_sysroot failure. e.g. A -> C B -> C A's RECIPE_SYSROOT is .../recipe-sysroot and B's RECIPE_SYSROOT is .../nativesdk-recipe-sysroot. As extend_recipe_sysroot function uses shared manifest, i.e., the same manifest of C for both A and B, then there must be one of them having the wrong manifest. And the wrong manifest results in RECIPE_SYSROOT not cleaned up before installing new components, thus the following error. Exception: FileExistsError: [Errno 17] File exists: xxx -> xxx This happens when toggling multilib and also between nativesdk recipes and crosssdk, cross-canadian recipes. The latter situation also explains why choosing ${WORKDIR}/recipe-sysroot instead of ${WORKDIR}/nativesdk-recipe-sysroot. If we use 'nativesdk-recipe-sysroot', we still need to modify the extend_recipe_sysroot function to treat crosssdk and cross-canadian as special cases. Using 'recipe-sysroot' does not have this problem. (From OE-Core rev: 665934a506cc560bfbc469f5ed095e7d54e353a5) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r--meta/classes/nativesdk.bbclass5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/classes/nativesdk.bbclass b/meta/classes/nativesdk.bbclass
index ab566e9803..f25b0c31b1 100644
--- a/meta/classes/nativesdk.bbclass
+++ b/meta/classes/nativesdk.bbclass
@@ -12,6 +12,11 @@ MACHINEOVERRIDES = ""
12 12
13MULTILIBS = "" 13MULTILIBS = ""
14 14
15# we need consistent staging dir whether or not multilib is enabled
16STAGING_DIR_HOST = "${WORKDIR}/recipe-sysroot"
17STAGING_DIR_TARGET = "${WORKDIR}/recipe-sysroot"
18RECIPE_SYSROOT = "${WORKDIR}/recipe-sysroot"
19
15# 20#
16# Update PACKAGE_ARCH and PACKAGE_ARCHS 21# Update PACKAGE_ARCH and PACKAGE_ARCHS
17# 22#