]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core.git/commit
mesa: allow mesa (gbm) to compile without backend
authorVincent Davis Jr <vince@underview.tech>
Sat, 14 Jan 2023 22:13:56 +0000 (16:13 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Wed, 18 Jan 2023 16:42:24 +0000 (16:42 +0000)
commit00a662c5e28235fb64348aab4ce9aeb5e7f95d06
treee4085cec93e9e6d4d3c26285a4b4a578803bd853
parentdd137feabdad2e7a2b3d107c703aad577a2e79c7
mesa: allow mesa (gbm) to compile without backend

Commit introduces a patch that allows for gbm to
be built with an empty backend. There are situation
where mesa-gl is the preferred provider for virtual/libgbm,
virtual/libgl, virtual/mesa, etc... But the x11 DISTRO_FEATURE
isn't included this leads to build errors such as

| /../../../ld: src/gbm/libgbm.so.1.0.0.p/main_backend.c.o: in function
`find_backend':
| backend.c:(.text.find_backend+0xa4): undefined reference to
`gbm_dri_backend'
| /../../../ld:
src/gbm/libgbm.so.1.0.0.p/main_backend.c.o:(.data.rel.ro.builtin_backends+0x4):
undefined reference to `gbm_dri_backend'
| collect2: error: ld returned 1 exit status

Add patch to bypass compilation issue by excluding gbm dri backend.

https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20447
https://gitlab.freedesktop.org/mesa/mesa/-/commit/842ca284650f066e58706741a7d22d67b5088e60

Commit also includes the use of TARGET_CFLAGS variable in mesa-gl recipe
to fix bellow compilation bug.

/../recipe-sysroot/usr/include/xf86drm.h:40:10: fatal error: drm.h: No such file or directory
|    40 | #include <drm.h>

Signed-off-by: Vincent Davis Jr <vince@underview.tech>
Signed-off-by: Luca Ceresoli <luca.ceresoli@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
meta/recipes-graphics/mesa/files/0001-gbm-backend-fix-gbm-compile-without-dri.patch [new file with mode: 0644]
meta/recipes-graphics/mesa/mesa-gl_22.3.3.bb
meta/recipes-graphics/mesa/mesa.inc