Message ID | 20241217034724.2737515-3-hongxu.jia@windriver.com |
---|---|
State | New |
Headers | show |
Series | [1/4] meta/lib/oe/sbom30.py: correct alias | expand |
diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc b/meta/recipes-devtools/gcc/gcc-cross.inc index f85ccd5c23..f82228f55a 100644 --- a/meta/recipes-devtools/gcc/gcc-cross.inc +++ b/meta/recipes-devtools/gcc/gcc-cross.inc @@ -4,6 +4,7 @@ INHIBIT_DEFAULT_DEPS = "1" EXTRADEPENDS = "" DEPENDS = "virtual/${TARGET_PREFIX}binutils ${EXTRADEPENDS} ${NATIVEDEPS}" PROVIDES = "virtual/${TARGET_PREFIX}gcc virtual/${TARGET_PREFIX}g++" +do_create_spdx[vardeps] += "SSTATE_ARCHS_TUNEPKG" python () { if d.getVar("TARGET_OS").startswith("linux"): d.setVar("EXTRADEPENDS", "linux-libc-headers")
The recipe gcc-cross inherited cross.bbclass which had class-native recipe behavior, but depends on class-target recipe linux-libc-headers. It caused the tweaking of ${TUNE_PKGARCH} for 32bit arm did not trigger rebuild of do_create_spdx in gcc-cross-arm Due to commit [meta/lib/oe/spdx30_tasks.py: fix hash link conflict while multiconfig enabled] applied, it added ${SSTATE_PKGARCH} to link prefix. While tweaking ${TUNE_PKGARCH} for 32bit arm, use do_create_spdx from sstate cache will caused ${SSTATE_PKGARCH} did not match In the following case, the link hash has no change while machine was changed $ echo 'MACHINE = "qemuarmv5"' >> conf/local.conf $ bitbake gcc-cross-arm $ grep linux-libc-headers tmp/deploy/spdx/3.0.1/x86_64/recipes/recipe-gcc-cross-arm.spdx.json "http://spdxdocs.org/openembedded-alias/by-doc-hash/09523e44e7b6fe1aed03347e30191c00d93500ce6e1f453e8dfdfae98d325f3e/linux-libc-headers/UNIHASH/build/recipe", $ echo 'MACHINE = "qemuarm"' >> conf/local.conf $ bitbake gcc-cross-arm $ grep linux-libc-headers tmp/deploy/spdx/3.0.1/x86_64/recipes/recipe-gcc-cross-arm.spdx.json "http://spdxdocs.org/openembedded-alias/by-doc-hash/09523e44e7b6fe1aed03347e30191c00d93500ce6e1f453e8dfdfae98d325f3e/linux-libc-headers/UNIHASH/build/recipe", Explicitly add var-SSTATE_ARCHS_TUNEPKG to vardeps of do_create_spdx to trigger rebuild in this situation. After applying this commit, the link hash has changed along with machine changed $ echo 'MACHINE = "qemuarmv5"' >> conf/local.conf $ bitbake gcc-cross-arm $ grep linux-libc-headers tmp/deploy/spdx/3.0.1/x86_64/recipes/recipe-gcc-cross-arm.spdx.json "http://spdxdocs.org/openembedded-alias/by-doc-hash/09523e44e7b6fe1aed03347e30191c00d93500ce6e1f453e8dfdfae98d325f3e/linux-libc-headers/UNIHASH/build/recipe", $ echo 'MACHINE = "qemuarm"' >> conf/local.conf $ bitbake gcc-cross-arm $ grep linux-libc-headers tmp/deploy/spdx/3.0.1/x86_64/recipes/recipe-gcc-cross-arm.spdx.json "http://spdxdocs.org/openembedded-alias/by-doc-hash/087e29d3627a06f5377effa627b99907607f5af0fe8f6d116b4490650c404a55/linux-libc-headers/UNIHASH/build/recipe", Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> --- meta/recipes-devtools/gcc/gcc-cross.inc | 1 + 1 file changed, 1 insertion(+)