From: Khem Raj Date: Mon, 5 May 2025 04:15:13 +0000 (-0700) Subject: mesa: Pass needed clang flags via BINDGEN_EXTRA_CLANG_ARGS X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=6d9f95a25dd32871e8c07ec3295a216236b3a7e0;p=thirdparty%2Fopenembedded%2Fopenembedded-core-contrib.git mesa: Pass needed clang flags via BINDGEN_EXTRA_CLANG_ARGS This is needed for clang to find the c++ headers when invoked via bindgen Fixes | /mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux/mesa/25.0.2/recipe-sysroot/usr/include/llvm/ADT/DenseMapInfo.h:17:10: fatal error: 'cassert' file not found | Unable to generate bindings: clang diagnosed error: /mnt/b/yoe/master/sources/poky/build/tmp/work/cortexa57-poky-linux/mesa/25.0.2/recipe-sysroot/usr/include/llvm/ADT/DenseMapInfo.h:17:10: fatal error: 'cassert' file not found | Signed-off-by: Khem Raj Cc: Dmitry Baryshkov Signed-off-by: Richard Purdie --- diff --git a/meta/recipes-graphics/mesa/mesa.inc b/meta/recipes-graphics/mesa/mesa.inc index 2b0ade496f..0356a13ecf 100644 --- a/meta/recipes-graphics/mesa/mesa.inc +++ b/meta/recipes-graphics/mesa/mesa.inc @@ -265,6 +265,10 @@ PACKAGES =+ "libegl-mesa libegl-mesa-dev \ mesa-vdpau-drivers mesa-tools \ " +do_compile:prepend:class-target() { + export BINDGEN_EXTRA_CLANG_ARGS="${HOST_CC_ARCH}${TOOLCHAIN_OPTIONS} --target=${TARGET_SYS}" +} + do_install:append () { # libwayland-egl has been moved to wayland 1.15+ rm -f ${D}${libdir}/libwayland-egl*