diff mbox series

[2/3] qemu: extend PKG_CONFIG_LIBDIR when using the host search path

Message ID 20260226143112.702564-2-ross.burton@arm.com
State Under Review
Headers show
Series [1/3] classes/pkgconfig: rationalise variable usage | expand

Commit Message

Ross Burton Feb. 26, 2026, 2:31 p.m. UTC
The qemu recipe does something horrible when building natively and can
also search the build host's search path.

Now that we've moved from PKG_CONFIG_PATH to PKG_CONFIG_LIBDIR, this
code also needs to do the same as otherwise it will find packages on the
build host before the native sysroot.

Signed-off-by: Ross Burton <ross.burton@arm.com>
---
 meta/recipes-devtools/qemu/qemu.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index 7aa593bc5d9..8abe366284e 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -129,7 +129,7 @@  do_configure:prepend:class-native() {
 	# Append build host pkg-config paths for native target since the host may provide sdl
 	BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config || echo "")
 	if [ ! -z "$BHOST_PKGCONFIG_PATH" ]; then
-		export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:$BHOST_PKGCONFIG_PATH
+		export PKG_CONFIG_LIBDIR=$PKG_CONFIG_LIBDIR:$BHOST_PKGCONFIG_PATH
 	fi
 }