]> code.ossystems Code Review - openembedded-core.git/commitdiff
rust-cross*: Fix OVERRRIDE references in task signature computation
authorRichard Purdie <richard.purdie@linuxfoundation.org>
Sat, 21 Aug 2021 21:36:29 +0000 (22:36 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 26 Aug 2021 21:09:24 +0000 (22:09 +0100)
The oeqa selftest test:
   sstatetests.SStateTests.test_sstate_sametune_samesigs
which checks if the sstate checksums of two identical machines
(using the same tune) are the same, apart from changes within
the machine specific stamps directory, fails on the assertion:
   self.assertCountEqual(files1, files2)
due to the signature of various 32 bit package builds such as:
   x86_64-linux/lib32-rust-cross-i686
   x86_64-linux/rust-cross-i686
   x86-pokymllib32-linux/lib32-libstd-rs
   x86-pokymllib32-linux/lib32-rust
differing. Jumping down the rabbit hole past all the bitbake-diffsig
outputs that differ due to dependent hashes, you come to a  diff of:
   -Variable MACHINEOVERRIDES value is ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}qemuall:${MACHINE}
   +Variable MACHINEOVERRIDES value is ${@bb.utils.contains('TUNE_FEATURES', 'mx32', 'x86-x32:', '', d)}${@bb.utils.contains('TUNE_FEATURES', 'm32', 'x86:', '', d)}qemuall:${MACHINE}:qemux86
in
   stamps/x86_64-linux/rust-cross-i686/1.54.0-r0.do_rust_gen_target.<sig>

This is because there are two rust functions referencing OVERRIDES
related variables (target_is_armv7 and llvm_features_from_tune). These
indirectly influnce the build and should be excluded from the signatures
directly as is done in other toolchain recipes, e.g.:

   39bfa0dd32 recipes/*-cross recipes: ignore TARGET_ARCH sstate hash

Signed-off-by: Randy MacLeod <Randy.MacLeod@windriver.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/classes/rust-common.bbclass
meta/recipes-devtools/rust/rust-common.inc

index 2093654ac6470971e4f20d758c64d8fb10e2391d..70f1ee0e3bdee33a773d22684b257a78aed57e1e 100644 (file)
@@ -48,6 +48,7 @@ def target_is_armv7(d):
         return False
     else:
         return True
+target_is_armv7[vardepvalue] = "${@target_is_armv7(d)}"
 
 # Responsible for taking Yocto triples and converting it to Rust triples
 def rust_base_triple(d, thing):
index f57415281524bae1efc6673d528fb6910d74253e..153fa3aa97552843c30edb3f3a148e3cf8517d26 100644 (file)
@@ -70,6 +70,7 @@ def llvm_features_from_tune(d):
     if ('riscv64' in feat) or ('riscv32' in feat):
         f.append("+a,+c,+d,+f,+m")
     return f
+llvm_features_from_tune[vardepvalue] = "${@llvm_features_from_tune(d)}"
 
 # TARGET_CC_ARCH changes from build/cross/target so it'll do the right thing
 # this should go away when https://github.com/rust-lang/rust/pull/31709 is