From: <kai.kang@windriver.com>
To: <openembedded-core@lists.openembedded.org>
Subject: [PATCH] mesa: fix with DEBUG_BUILD enabled
Date: Mon, 18 Jul 2022 10:21:59 +0800 [thread overview]
Message-ID: <20220718022159.39781-1-kai.kang@windriver.com> (raw)
From: Kai Kang <kai.kang@windriver.com>
It fails to compile mesa-native when DEBUG_BUILD is enabled:
../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function ‘nir_opt_move_block’:
../mesa-22.1.3/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)
^~~~~~~~~~
Remove 'ALWAYS_INLINE' for function src_is_ssa.
Signed-off-by: Kai Kang <kai.kang@windriver.com>
---
.../mesa/files/0001-nir-fix-build-at-Og.patch | 31 +++++++++++++++++++
meta/recipes-graphics/mesa/mesa.inc | 1 +
2 files changed, 32 insertions(+)
create mode 100644 meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
diff --git a/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
new file mode 100644
index 0000000000..5b4a5c7231
--- /dev/null
+++ b/meta/recipes-graphics/mesa/files/0001-nir-fix-build-at-Og.patch
@@ -0,0 +1,31 @@
+At -Og with gcc 12.1, it fails to compile:
+
+../mesa-22.1.3/src/compiler/nir/nir_inline_helpers.h: In function ‘nir_opt_move_block’:
+../mesa-22.1.3/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)
+ ^~~~~~~~~~
+
+Remove 'ALWAYS_INLINE' for function src_is_ssa.
+
+Upstream-Status: Submitted [https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17589]
+
+Signed-off-by: Kai Kang <kai.kang@windriver.com>
+---
+ src/compiler/nir/nir_opt_move.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/compiler/nir/nir_opt_move.c b/src/compiler/nir/nir_opt_move.c
+index 81bcde5c436..09db6717002 100644
+--- a/src/compiler/nir/nir_opt_move.c
++++ b/src/compiler/nir/nir_opt_move.c
+@@ -51,7 +51,7 @@
+ * lower register pressure.
+ */
+
+-static ALWAYS_INLINE bool
++static bool
+ src_is_ssa(nir_src *src, void *state)
+ {
+ return src->is_ssa;
+--
+2.34.1
+
diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc
index 710cacb09d..58e662efd4 100644
--- a/meta/recipes-graphics/mesa/mesa.inc
+++ b/meta/recipes-graphics/mesa/mesa.inc
@@ -22,6 +22,7 @@ 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-fix-build-at-Og.patch \
"
SRC_URI[sha256sum] = "b98f32ba7aa2a1ff5725fb36eb999c693079f0ca16f70aa2f103e2b6c3f093e3"
--
2.17.1
next reply other threads:[~2022-07-18 2:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-18 2:21 kai.kang [this message]
2022-07-18 15:09 ` [OE-core] [PATCH] mesa: fix with DEBUG_BUILD enabled Ross Burton
2022-07-19 1:35 ` Kai
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220718022159.39781-1-kai.kang@windriver.com \
--to=kai.kang@windriver.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox