On Wed, Dec 11, 2024 at 5:07 AM Hongxu Jia <hongxu....@windriver.com> wrote:
>
> 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. Add the code along with adding
> linux-libc-headers to gcc-cross's depends
>
> 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....@windriver.com>
> ---
>  meta/recipes-devtools/gcc/gcc-cross.inc | 1 +
>  1 file changed, 1 insertion(+)
>
> diff --git a/meta/recipes-devtools/gcc/gcc-cross.inc 
> b/meta/recipes-devtools/gcc/gcc-cross.inc
> index f85ccd5c23..d6936d063a 100644
> --- a/meta/recipes-devtools/gcc/gcc-cross.inc
> +++ b/meta/recipes-devtools/gcc/gcc-cross.inc
> @@ -7,6 +7,7 @@ PROVIDES = "virtual/${TARGET_PREFIX}gcc 
> virtual/${TARGET_PREFIX}g++"
>  python () {
>      if d.getVar("TARGET_OS").startswith("linux"):
>          d.setVar("EXTRADEPENDS", "linux-libc-headers")
> +        d.appendVarFlag("do_create_spdx", "vardeps", " SSTATE_ARCHS_TUNEPKG")

Does this need to be conditional? Maybe it should just always be a
vardep of do_create_spdx?

>  }
>
>  PN = "gcc-cross-${TARGET_ARCH}"
> --
> 2.25.1
>
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#208593): 
https://lists.openembedded.org/g/openembedded-core/message/208593
Mute This Topic: https://lists.openembedded.org/mt/110059788/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to