diff mbox series

[PATCHv3] graphene: add a PACKAGECONFIG for arm_neon

Message ID 20230213104228.1067057-1-f_l_k@t-online.de
State Accepted, archived
Commit 72778f6a647f47926c6ba1b77f0984999a22e44a
Headers show
Series [PATCHv3] graphene: add a PACKAGECONFIG for arm_neon | expand

Commit Message

Markus Volk Feb. 13, 2023, 10:42 a.m. UTC
Not all arm platforms support neon and runtime detection for this feature is
currently not reliable. Add a PACKAGECONFIG that disables neon support for arm
but can be manually enabled.

Enable neon for aarch64 by default

Signed-off-by: Markus Volk <f_l_k@t-online.de>
---
 meta/recipes-graphics/graphene/graphene_1.10.8.bb | 2 ++
 1 file changed, 2 insertions(+)

Comments

Alexander Kanavin Feb. 13, 2023, 10:45 a.m. UTC | #1
Doesn't this negate 'introspection' assigned with ?= ? Can you verify
the final value on aarch64?

(yes, this is a never-ending confusion, and I don't know how that
works either, after all the years of dealing with it).

Alex

On Mon, 13 Feb 2023 at 11:42, Markus Volk <f_l_k@t-online.de> wrote:
>
> Not all arm platforms support neon and runtime detection for this feature is
> currently not reliable. Add a PACKAGECONFIG that disables neon support for arm
> but can be manually enabled.
>
> Enable neon for aarch64 by default
>
> Signed-off-by: Markus Volk <f_l_k@t-online.de>
> ---
>  meta/recipes-graphics/graphene/graphene_1.10.8.bb | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> index 813ff74adf..0efe6520d8 100644
> --- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> +++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
> @@ -11,7 +11,9 @@ SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da3
>
>  # gtk4 & mutter 41.0 requires graphene build with introspection
>  PACKAGECONFIG ?= "introspection"
> +PACKAGECONFIG:aarch64 += "neon"
>  PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,"
> +PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
>
>  GTKDOC_MESON_OPTION = "gtk_doc"
>
> --
> 2.34.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#177093): https://lists.openembedded.org/g/openembedded-core/message/177093
> Mute This Topic: https://lists.openembedded.org/mt/96933147/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
Markus Volk Feb. 13, 2023, 11 a.m. UTC | #2
Am Mo, 13. Feb 2023 um 11:45:45 +0100 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> Can you verify
> the final value on aarch64?

You are absolutely right. ?= negates the introspection. I wasn't 
expecting that and was just checking to see if neon was properly 
activated.
What would be the best way to handle this? Since oe-core should be kept 
free of :append, just remove the '?'.
Markus Volk Feb. 13, 2023, 11:25 a.m. UTC | #3
Am Mo, 13. Feb 2023 um 12:00:08 +0100 schrieb Markus Volk 
<f_l_k@t-online.de>:
> just remove the '?'

No. That didn't help either.

The only way that seems to work for me is:
PACKAGECONFIG:append:aarch64 = " neon"
Alexander Kanavin Feb. 13, 2023, 11:30 a.m. UTC | #4
Does enabling neon break the build on non-aarch64?

If not, then it could just be added to the default weak set.

Otherwise,
PACKAGECONFIG:append:aarch64 = " neon" seems most sensible. It can
still be undone with :remove (which is ugly but possible).

Alex

On Mon, 13 Feb 2023 at 12:25, Markus Volk <f_l_k@t-online.de> wrote:
>
> Am Mo, 13. Feb 2023 um 12:00:08 +0100 schrieb Markus Volk <f_l_k@t-online.de>:
>
> just remove the '?'
>
>
> No. That didn't help either.
>
> The only way that seems to work for me is:
> PACKAGECONFIG:append:aarch64 = " neon"
Markus Volk Feb. 13, 2023, 11:36 a.m. UTC | #5
Am Mo, 13. Feb 2023 um 12:30:42 +0100 schrieb Alexander Kanavin 
<alex.kanavin@gmail.com>:
> Does enabling neon break the build on non-aarch64?

As far as I know it breaks runtime for some armv7 tunes and will 
probably also break build for older arm platforms that do not support 
neon at all.

That would also work:
PACKAGECONFIG ?= "introspection ${@bb.utils.contains('TUNE_FEATURES', 
'aarch64', 'neon', '', d)}"
Alexander Kanavin Feb. 13, 2023, 11:39 a.m. UTC | #6
This seems best. There are numerous places in core where something
similar is used.

Alex

On Mon, 13 Feb 2023 at 12:37, Markus Volk <f_l_k@t-online.de> wrote:
>
> Am Mo, 13. Feb 2023 um 12:30:42 +0100 schrieb Alexander Kanavin <alex.kanavin@gmail.com>:
>
> Does enabling neon break the build on non-aarch64?
>
>
> As far as I know it breaks runtime for some armv7 tunes and will probably also break build for older arm platforms that do not support neon at all.
>
> That would also work:
> PACKAGECONFIG ?= "introspection ${@bb.utils.contains('TUNE_FEATURES', 'aarch64', 'neon', '', d)}"
diff mbox series

Patch

diff --git a/meta/recipes-graphics/graphene/graphene_1.10.8.bb b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
index 813ff74adf..0efe6520d8 100644
--- a/meta/recipes-graphics/graphene/graphene_1.10.8.bb
+++ b/meta/recipes-graphics/graphene/graphene_1.10.8.bb
@@ -11,7 +11,9 @@  SRC_URI[archive.sha256sum] = "a37bb0e78a419dcbeaa9c7027bcff52f5ec2367c25ec859da3
 
 # gtk4 & mutter 41.0 requires graphene build with introspection
 PACKAGECONFIG ?= "introspection"
+PACKAGECONFIG:aarch64 += "neon"
 PACKAGECONFIG[introspection] = "-Dintrospection=enabled,-Dintrospection=disabled,"
+PACKAGECONFIG[neon] = "-Darm_neon=true,-Darm_neon=false,"
 
 GTKDOC_MESON_OPTION = "gtk_doc"