diff options
author | Mike Crowe <mac@mcrowe.com> | 2019-12-17 08:02:25 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-12-30 23:39:10 +0000 |
commit | c1ad30fd80740701f7c264381fc2e3e34460927f (patch) | |
tree | 98a32c5a954c49d441f8aa10840a836e8f9da761 | |
parent | 30c8fbf7798f55193800ed83be92255484ae2709 (diff) | |
download | poky-c1ad30fd80740701f7c264381fc2e3e34460927f.tar.gz |
multilib.conf: Ensure that RECIPE_SYSROOT is unchanged for native
Ensure that RECIPE_SYSROOT is the same for -native recipes whether
multilib.conf is included or not.
Without this change task signatures for -native recipes change when
switching between MACHINEs that require multilib.conf and those that
don't.
This fix was one of the ones suggested by Khem Raj in
http://lists.openembedded.org/pipermail/openembedded-core/2019-December/290303.html
Add test_sstate_multilib_or_not_native_samesigs test case to
sstatetests.py to ensure that this stays fixed.
(From OE-Core rev: aa05f1ded71366b86eda7fce24d8b5395e85ada2)
Signed-off-by: Mike Crowe <mac@mcrowe.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | meta/conf/multilib.conf | 1 | ||||
-rw-r--r-- | meta/lib/oeqa/selftest/cases/sstatetests.py | 40 |
2 files changed, 41 insertions, 0 deletions
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf index cfed3fbbd0..58f2ac5c86 100644 --- a/meta/conf/multilib.conf +++ b/meta/conf/multilib.conf | |||
@@ -9,6 +9,7 @@ MULTILIBS ??= "multilib:lib32" | |||
9 | STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot" | 9 | STAGING_DIR_HOST = "${WORKDIR}/${MLPREFIX}recipe-sysroot" |
10 | STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot" | 10 | STAGING_DIR_TARGET = "${WORKDIR}/${MLPREFIX}recipe-sysroot" |
11 | RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot" | 11 | RECIPE_SYSROOT = "${WORKDIR}/${MLPREFIX}recipe-sysroot" |
12 | RECIPE_SYSROOT_class-native = "${WORKDIR}/recipe-sysroot" | ||
12 | 13 | ||
13 | INHERIT += "multilib_global" | 14 | INHERIT += "multilib_global" |
14 | 15 | ||
diff --git a/meta/lib/oeqa/selftest/cases/sstatetests.py b/meta/lib/oeqa/selftest/cases/sstatetests.py index 6757a0ec68..9adb511960 100644 --- a/meta/lib/oeqa/selftest/cases/sstatetests.py +++ b/meta/lib/oeqa/selftest/cases/sstatetests.py | |||
@@ -446,6 +446,46 @@ BB_SIGNATURE_HANDLER = "OEBasicHash" | |||
446 | self.assertCountEqual(files1, files2) | 446 | self.assertCountEqual(files1, files2) |
447 | 447 | ||
448 | 448 | ||
449 | def test_sstate_multilib_or_not_native_samesigs(self): | ||
450 | """The sstate checksums of two native recipes (and their dependencies) | ||
451 | where the target is using multilib in one but not the other | ||
452 | should be the same. We use the qemux86copy machine to test | ||
453 | this. | ||
454 | """ | ||
455 | |||
456 | self.write_config(""" | ||
457 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash\" | ||
458 | TCLIBCAPPEND = \"\" | ||
459 | MACHINE = \"qemux86\" | ||
460 | require conf/multilib.conf | ||
461 | MULTILIBS = "multilib:lib32" | ||
462 | DEFAULTTUNE_virtclass-multilib-lib32 = "x86" | ||
463 | BB_SIGNATURE_HANDLER = "OEBasicHash" | ||
464 | """) | ||
465 | self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash") | ||
466 | bitbake("binutils-native -S none") | ||
467 | self.write_config(""" | ||
468 | TMPDIR = \"${TOPDIR}/tmp-sstatesamehash2\" | ||
469 | TCLIBCAPPEND = \"\" | ||
470 | MACHINE = \"qemux86copy\" | ||
471 | BB_SIGNATURE_HANDLER = "OEBasicHash" | ||
472 | """) | ||
473 | self.track_for_cleanup(self.topdir + "/tmp-sstatesamehash2") | ||
474 | bitbake("binutils-native -S none") | ||
475 | |||
476 | def get_files(d): | ||
477 | f = [] | ||
478 | for root, dirs, files in os.walk(d): | ||
479 | for name in files: | ||
480 | f.append(os.path.join(root, name)) | ||
481 | return f | ||
482 | files1 = get_files(self.topdir + "/tmp-sstatesamehash/stamps") | ||
483 | files2 = get_files(self.topdir + "/tmp-sstatesamehash2/stamps") | ||
484 | files2 = [x.replace("tmp-sstatesamehash2", "tmp-sstatesamehash") for x in files2] | ||
485 | self.maxDiff = None | ||
486 | self.assertCountEqual(files1, files2) | ||
487 | |||
488 | |||
449 | def test_sstate_noop_samesigs(self): | 489 | def test_sstate_noop_samesigs(self): |
450 | """ | 490 | """ |
451 | The sstate checksums of two builds with these variables changed or | 491 | The sstate checksums of two builds with these variables changed or |