]> code.ossystems Code Review - openembedded-core.git/commitdiff
qemu: Fix build when x11 is not in distro features
authorKhem Raj <raj.khem@gmail.com>
Wed, 9 Mar 2022 17:07:51 +0000 (09:07 -0800)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 10 Mar 2022 13:06:22 +0000 (13:06 +0000)
There is use of MESA_EGL_NO_X11_HEADERS which is now renamed in newer headers to
EGL_NO_X11 from mesa/khronos headers, however this define is
relatively new and 3D stacks do not have this adopted but apps
like qemu and bunch of others depend on it, I guess they assume mesa.
One can argue that its better to fix the 3D stacks to behave
like mesa but this means every BSP using these stacks will need to
carry such a fix.

https://gitlab.freedesktop.org/mesa/mesa/-/blob/main/include/EGL/eglplatform.h

Signed-off-by: Khem Raj <raj.khem@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-devtools/qemu/qemu_6.2.0.bb

index 062ed32b01502dd19db2ebffabfbbf3e1988a4aa..c7eef0a9d5ece6a90cbabb636635eb1a75c69c20 100644 (file)
@@ -6,6 +6,8 @@ DEPENDS = "glib-2.0 zlib pixman bison-native ninja-native meson-native"
 
 DEPENDS:append:libc-musl = " libucontext"
 
+CFLAGS += "${@bb.utils.contains('DISTRO_FEATURES', 'x11', '', '-DEGL_NO_X11=1', d)}"
+
 RDEPENDS:${PN}:class-target += "bash"
 
 EXTRA_OECONF:append:class-target = " --target-list=${@get_qemu_target_list(d)}"