Patchwork [1/1] qemu: fix qemu-native pkg-config paths

mail settings
Submitter Cristian Iorga
Date July 3, 2014, 12:57 p.m.
Message ID <>
Download mbox | patch
Permalink /patch/74973/
State New
Headers show


Cristian Iorga - July 3, 2014, 12:57 p.m.
For qemu-native, the pkg-config paths do not
include build host paths.
This is an issue for libsdl for example, where SDL is
used by qemu, but for qemu-native libsdl-native is not
built, but assumed to be provided by the build host.
Because pkg-config do not search for libsdl config files
on the build host sysroot, the configure stage of qemu-native
will fail because it will not find SDL as being installed.
Usually, the isssue is masked by a functional sdl-config that
will be interogated instead of pkg-config. However, on Build
Appliance, sdl-config is deliberately made non-functional,
so the issue manifests itself.

The fix will create an extended PKG_CONFIG_PATH, which does
include the build host sysroot paths for pkg-config.

Fix for [YP #6495].

Signed-off-by: Cristian Iorga <>
 meta/recipes-devtools/qemu/ | 4 ++++
 1 file changed, 4 insertions(+)


diff --git a/meta/recipes-devtools/qemu/ b/meta/recipes-devtools/qemu/
index 076e8ad..449b5f4 100644
--- a/meta/recipes-devtools/qemu/
+++ b/meta/recipes-devtools/qemu/
@@ -33,6 +33,10 @@  EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} --disa
 export LIBTOOL="${HOST_SYS}-libtool"
 do_configure_prepend_class-native() {
+        #Append build host pkg-config paths for native target
+        BHOST_PKGCONFIG_PATH=$(PATH=/usr/bin:/bin pkg-config --variable pc_path pkg-config)
 	# Undo the -lX11 added by linker-flags.patch, don't assume that host has libX11 installed
 	sed -i 's/-lX11//g'