mirror of
https://github.com/godotengine/buildroot.git
synced 2026-01-05 14:09:53 +03:00
Sincecf75d7da98we have a build failures when building libgbm.so when valgrind package is selected because --static is always passed to pkg-config even for shared build. Even if -Dvalgrind=false on meson command line to build mesa, the valgrind libraries come from pkg-config libdrm... output/host/bin/pkg-config libdrm --libs --static -L[...]/sysroot/usr/lib -ldrm -lm -L[...]/sysroot/usr/lib/valgrind -lcoregrind-arm64-linux -lvex-arm64-linux -lgcc ... and break the build. See initial discussions: http://lists.busybox.net/pipermail/buildroot/2020-June/284543.html This is due to a wrong condition test added by the patch 0004-mesonbuild-dependencies-base.py-add-pkg_config_stati.patch. Indeed, pkg_config_static is a string, not a boolean; it is set to either 'true' or 'aflse' by our meson package infra. Since the returned object is a string, do not pass a boolean, but pas None (we only want to test against the 'true' string, so we don't care what we get back when it is not set, which never happens in Buildroot). Before this patch, the issue can be reproduced using the following defconfig: BR2_aarch64=y BR2_TOOLCHAIN_EXTERNAL=y BR2_PACKAGE_VALGRIND=y BR2_PACKAGE_MESA3D=y BR2_PACKAGE_MESA3D_DRI_DRIVER_SWRAST=y Fixes: http://autobuild.buildroot.net/results/1b5/1b58d73ecbbe1af2c3e140563d696cf32d1c4a5a/build-end.log Signed-off-by: Romain Naour <romain.naour@gmail.com> Cc: James Hilliard <james.hilliard1@gmail.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Fabrice Fontaine <fontaine.fabrice@gmail.com> [yann.morin.1998@free.fr: slightly reword the commit log] Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> (cherry picked from commit6ae1932e71) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>