diff mbox series

mesa: only apply patch to fix ALWAYS_INLINE for native

Message ID 20220921053109.10792-1-kai.kang@windriver.com
State New
Headers show
Series mesa: only apply patch to fix ALWAYS_INLINE for native | expand

Commit Message

Kai Sept. 21, 2022, 5:31 a.m. UTC
From: Kai Kang <kai.kang@windriver.com>

0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch is not
required by target mesa any more. But it still fails to compile
mesa-native with DEBUG_BUILD enabled on Ubuntu 18.04 with gcc 7.5.0
without this patch:

| ../mesa-22.1.6/src/compiler/nir/nir_inline_helpers.h: In function ‘nir_opt_move_block’:
| ../mesa-22.1.6/src/compiler/nir/nir_opt_move.c:55:1: error: inlining failed in call to
    always_inline ‘src_is_ssa’: indirect function call with a yet undetermined callee
|  src_is_ssa(nir_src *src, void *state)
|  ^~~~~~~~~~

So only apply it for mesa-native.

Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Khem Raj Sept. 21, 2022, 7:49 a.m. UTC | #1
On Wed, Sep 21, 2022 at 1:31 AM kai <kai.kang@windriver.com> wrote:

> From: Kai Kang <kai.kang@windriver.com>
>
> 0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch is not
> required by target mesa any more. But it still fails to compile
> mesa-native with DEBUG_BUILD enabled on Ubuntu 18.04 with gcc 7.5.0
> without this patch:


Perhaps add a comment on the recipe as well so we do not forget to remove
it when Ubuntu 18.04 is dropped in future

>
>
> | ../mesa-22.1.6/src/compiler/nir/nir_inline_helpers.h: In function
> ‘nir_opt_move_block’:
> | ../mesa-22.1.6/src/compiler/nir/nir_opt_move.c:55:1: error: inlining
> failed in call to
>     always_inline ‘src_is_ssa’: indirect function call with a yet
> undetermined callee
> |  src_is_ssa(nir_src *src, void *state)
> |  ^~~~~~~~~~
>
> So only apply it for mesa-native.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/recipes-graphics/mesa/mesa.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa.inc
> b/meta/recipes-graphics/mesa/mesa.inc
> index ea7ed4fd27..c306c6b726 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -22,8 +22,8 @@ SRC_URI = "
> https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
>             file://0001-util-format-Check-for-NEON-before-using-it.patch \
>
> file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
>
> file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \
> -
>  file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \
>             "
> +SRC_URI:append:class-native = "
> file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch"
>
>  SRC_URI[sha256sum] =
> "22ced061eb9adab8ea35368246c1995c09723f3f71653cd5050c5cec376e671a"
>
> --
> 2.17.1
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#170930):
> https://lists.openembedded.org/g/openembedded-core/message/170930
> Mute This Topic: https://lists.openembedded.org/mt/93820842/1997914
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> raj.khem@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
Kai Sept. 21, 2022, 7:52 a.m. UTC | #2
On 9/21/22 15:49, Khem Raj wrote:
>
>
> On Wed, Sep 21, 2022 at 1:31 AM kai <kai.kang@windriver.com> wrote:
>
>     From: Kai Kang <kai.kang@windriver.com>
>
>     0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch is not
>     required by target mesa any more. But it still fails to compile
>     mesa-native with DEBUG_BUILD enabled on Ubuntu 18.04 with gcc 7.5.0
>     without this patch:
>
>
> Perhaps add a comment on the recipe as well so we do not forget to 
> remove it when Ubuntu 18.04 is dropped in future

OK.

Kai

>
>
>     | ../mesa-22.1.6/src/compiler/nir/nir_inline_helpers.h: In
>     function ‘nir_opt_move_block’:
>     | ../mesa-22.1.6/src/compiler/nir/nir_opt_move.c:55:1: error:
>     inlining failed in call to
>         always_inline ‘src_is_ssa’: indirect function call with a yet
>     undetermined callee
>     |  src_is_ssa(nir_src *src, void *state)
>     |  ^~~~~~~~~~
>
>     So only apply it for mesa-native.
>
>     Signed-off-by: Kai Kang <kai.kang@windriver.com>
>     ---
>      meta/recipes-graphics/mesa/mesa.inc | 2 +-
>      1 file changed, 1 insertion(+), 1 deletion(-)
>
>     diff --git a/meta/recipes-graphics/mesa/mesa.inc
>     b/meta/recipes-graphics/mesa/mesa.inc
>     index ea7ed4fd27..c306c6b726 100644
>     --- a/meta/recipes-graphics/mesa/mesa.inc
>     +++ b/meta/recipes-graphics/mesa/mesa.inc
>     @@ -22,8 +22,8 @@ SRC_URI =
>     "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz
>     <https://urldefense.com/v3/__https://mesa.freedesktop.org/archive/mesa-$*7BPV*7D.tar.xz__;JSU!!AjveYdw8EvQ!dbbFFL5lCMGNpfGo89Tb3Dh3mIAaTcrL4Yy04D-dUFftLJBFkOJLoY51QCvQNTuqbJxjJgVayxu3G8vvmg$>
>     \
>     file://0001-util-format-Check-for-NEON-before-using-it.patch \
>     file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch
>     \
>     file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch
>     \
>     -
>     file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \
>                 "
>     +SRC_URI:append:class-native = "
>     file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch"
>
>      SRC_URI[sha256sum] =
>     "22ced061eb9adab8ea35368246c1995c09723f3f71653cd5050c5cec376e671a"
>
>     -- 
>     2.17.1
>
>
>     -=-=-=-=-=-=-=-=-=-=-=-
>     Links: You receive all messages sent to this group.
>     View/Reply Online (#170930):
>     https://lists.openembedded.org/g/openembedded-core/message/170930
>     <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/message/170930__;!!AjveYdw8EvQ!dbbFFL5lCMGNpfGo89Tb3Dh3mIAaTcrL4Yy04D-dUFftLJBFkOJLoY51QCvQNTuqbJxjJgVayxufAyqgrw$>
>     Mute This Topic:
>     https://lists.openembedded.org/mt/93820842/1997914
>     <https://urldefense.com/v3/__https://lists.openembedded.org/mt/93820842/1997914__;!!AjveYdw8EvQ!dbbFFL5lCMGNpfGo89Tb3Dh3mIAaTcrL4Yy04D-dUFftLJBFkOJLoY51QCvQNTuqbJxjJgVayxs-kZQkXA$>
>     Group Owner: openembedded-core+owner@lists.openembedded.org
>     <mailto:openembedded-core%2Bowner@lists.openembedded.org>
>     Unsubscribe:
>     https://lists.openembedded.org/g/openembedded-core/unsub
>     <https://urldefense.com/v3/__https://lists.openembedded.org/g/openembedded-core/unsub__;!!AjveYdw8EvQ!dbbFFL5lCMGNpfGo89Tb3Dh3mIAaTcrL4Yy04D-dUFftLJBFkOJLoY51QCvQNTuqbJxjJgVayxvzfSij7A$>
>     [raj.khem@gmail.com]
>     -=-=-=-=-=-=-=-=-=-=-=-
>
Martin Jansa Sept. 21, 2022, 10:24 a.m. UTC | #3
Good that confirms what I was seeing earlier -
https://lists.openembedded.org/g/openembedded-core/message/169002

On Wed, Sep 21, 2022 at 7:31 AM <kai.kang@windriver.com> wrote:

> From: Kai Kang <kai.kang@windriver.com>
>
> 0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch is not
> required by target mesa any more. But it still fails to compile
> mesa-native with DEBUG_BUILD enabled on Ubuntu 18.04 with gcc 7.5.0
> without this patch:
>
> | ../mesa-22.1.6/src/compiler/nir/nir_inline_helpers.h: In function
> ‘nir_opt_move_block’:
> | ../mesa-22.1.6/src/compiler/nir/nir_opt_move.c:55:1: error: inlining
> failed in call to
>     always_inline ‘src_is_ssa’: indirect function call with a yet
> undetermined callee
> |  src_is_ssa(nir_src *src, void *state)
> |  ^~~~~~~~~~
>
> So only apply it for mesa-native.
>
> Signed-off-by: Kai Kang <kai.kang@windriver.com>
> ---
>  meta/recipes-graphics/mesa/mesa.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/recipes-graphics/mesa/mesa.inc
> b/meta/recipes-graphics/mesa/mesa.inc
> index ea7ed4fd27..c306c6b726 100644
> --- a/meta/recipes-graphics/mesa/mesa.inc
> +++ b/meta/recipes-graphics/mesa/mesa.inc
> @@ -22,8 +22,8 @@ SRC_URI = "
> https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
>             file://0001-util-format-Check-for-NEON-before-using-it.patch \
>
> file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
>
> file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \
> -
>  file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \
>             "
> +SRC_URI:append:class-native = "
> file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch"
>
>  SRC_URI[sha256sum] =
> "22ced061eb9adab8ea35368246c1995c09723f3f71653cd5050c5cec376e671a"
>
> --
> 2.17.1
>
>
diff mbox series

Patch

diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index ea7ed4fd27..c306c6b726 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -22,8 +22,8 @@  SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-util-format-Check-for-NEON-before-using-it.patch \
            file://0001-Revert-egl-wayland-deprecate-drm_handle_format-and-d.patch \
            file://0001-swrast_kms-use-swkmsDRI2Extension-instead-of-driDRI2.patch \
-           file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \
            "
+SRC_URI:append:class-native = " file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch"
 
 SRC_URI[sha256sum] = "22ced061eb9adab8ea35368246c1995c09723f3f71653cd5050c5cec376e671a"