Skip to contentSkip to conversation

mesa: only apply patch to fix ALWAYS_INLINE for native

PATCH New [email protected] 1 participant 1 message Sep 30, 2022

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 mesa: only apply patch to fix ALWAYS_INLINE for native

From: Kai Kang <[email protected]>

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

| ../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.

---
v3:
* rebase

 meta/recipes-graphics/mesa/mesa.inc | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +3 -1
index 8a74e0a80a..c94e439363 100644
@@ -19,9 +19,11 @@ SRC_URI = "https://mesa.freedesktop.org/archive/mesa-${PV}.tar.xz \
            file://0001-meson-misdetects-64bit-atomics-on-mips-clang.patch \
            file://0001-futex.h-Define-__NR_futex-if-it-does-not-exist.patch \
            file://0001-util-format-Check-for-NEON-before-using-it.patch \
-           file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch \
            "
 
+# required by mesa-native on Ubuntu 18.04 with gcc 7.5 when DEBUG_BUILD enabled
+SRC_URI:append:class-native = " file://0001-nir-nir_opt_move-fix-ALWAYS_INLINE-compiler-error.patch"
+
 SRC_URI[sha256sum] = "b1f9c8fd08f2cae3adf83355bef4d2398e8025f44947332880f2d0066bdafa8c"
 
 UPSTREAM_CHECK_GITTAGREGEX = "mesa-(?P<pver>\d+(\.\d+)+)"
Signature · 1 line
2.17.1