diff mbox series

[v2] staging.bbclass: Inlcude native dirs for nativesdk build

Message ID 20231110064147.20798-1-uvv.mail@gmail.com
State New
Headers show
Series [v2] staging.bbclass: Inlcude native dirs for nativesdk build | expand

Commit Message

Vyacheslav Yurkov Nov. 10, 2023, 6:41 a.m. UTC
Some build systems (like cmake) check whether target binaries are
present even if they are not used during compilation. Excluded ${bindir}
causes such recipes to fail to build nativesdk variant. The good
example of that is protobuf/grpc nativesdk build from meta-oe layer.

For more details refer this long discussion:
https://lists.openembedded.org/g/openembedded-devel/topic/101679410#105284

Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
---
 meta/classes-global/staging.bbclass | 1 +
 1 file changed, 1 insertion(+)

Comments

Richard Purdie Nov. 10, 2023, 8:12 a.m. UTC | #1
On Fri, 2023-11-10 at 07:41 +0100, Vyacheslav Yurkov wrote:
> Some build systems (like cmake) check whether target binaries are
> present even if they are not used during compilation. Excluded ${bindir}
> causes such recipes to fail to build nativesdk variant. The good
> example of that is protobuf/grpc nativesdk build from meta-oe layer.
> 
> For more details refer this long discussion:
> https://lists.openembedded.org/g/openembedded-devel/topic/101679410#105284
> 
> Signed-off-by: Vyacheslav Yurkov <uvv.mail@gmail.com>
> ---
>  meta/classes-global/staging.bbclass | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass
> index d229f40107..72c811d609 100644
> --- a/meta/classes-global/staging.bbclass
> +++ b/meta/classes-global/staging.bbclass
> @@ -26,6 +26,7 @@ SYSROOT_DIRS_NATIVE = " \
>      ${localstatedir} \
>  "
>  SYSROOT_DIRS:append:class-native = " ${SYSROOT_DIRS_NATIVE}"
> +SYSROOT_DIRS:append:class-nativesdk = " ${SYSROOT_DIRS_NATIVE}"
>  SYSROOT_DIRS:append:class-cross = " ${SYSROOT_DIRS_NATIVE}"
>  SYSROOT_DIRS:append:class-crosssdk = " ${SYSROOT_DIRS_NATIVE}"
>  

This has disk space performance implications. We don't want to to this
just because there is one "bad" recipe out there. I think we should be
working around the issue in that recipe, or changing cmake not to have
the issue. Adding a load of pointless binaries to the sysroot for all
recipes is not a good solution for us.

Cheers,

Richard
diff mbox series

Patch

diff --git a/meta/classes-global/staging.bbclass b/meta/classes-global/staging.bbclass
index d229f40107..72c811d609 100644
--- a/meta/classes-global/staging.bbclass
+++ b/meta/classes-global/staging.bbclass
@@ -26,6 +26,7 @@  SYSROOT_DIRS_NATIVE = " \
     ${localstatedir} \
 "
 SYSROOT_DIRS:append:class-native = " ${SYSROOT_DIRS_NATIVE}"
+SYSROOT_DIRS:append:class-nativesdk = " ${SYSROOT_DIRS_NATIVE}"
 SYSROOT_DIRS:append:class-cross = " ${SYSROOT_DIRS_NATIVE}"
 SYSROOT_DIRS:append:class-crosssdk = " ${SYSROOT_DIRS_NATIVE}"