]> code.ossystems Code Review - openembedded-core.git/commitdiff
multilib: let pkg-config find architecture-independent .pc files
authorRoss Burton <ross.burton@intel.com>
Thu, 20 Aug 2015 15:04:02 +0000 (16:04 +0100)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Mon, 24 Aug 2015 22:24:53 +0000 (23:24 +0100)
If a multilib package depends on an allarch recipe that installs an
architecture-independent .pc file it will not be able to find the .pc file as
the recipe gets installed into the MACHINE sysroot but pkg-config looks in the
MLPREFIX-prefixed sysroot.

Solve this by extending PKG_CONFIG_PATH in multilib environments to include the
architecture-independent path in the MACHINE sysroot
(sysroots/MACHINE/usr/share/pkgconfig/).

Signed-off-by: Ross Burton <ross.burton@intel.com>
meta/conf/multilib.conf

index 37e8481112f017ade6352a6e5fee7c02696c43e4..89a8e9096fc0c0f086fbca187153afa5f530dfae 100644 (file)
@@ -17,3 +17,10 @@ BBCLASSEXTEND_append = " ${MULTILIBS}"
 MULTILIB_GLOBAL_VARIANTS ?= "lib32 lib64 libx32"
 
 OPKG_ARGS_append = " --force-maintainer --force-overwrite"
+
+# When multilib is enabled, allarch recipes will be installed into the MACHINE
+# sysroot, not MLPREFIXMACHINE.  This means that anything using pkg-config to
+# find an allarch pkgconfig file will fail as the PKG_CONFIG_PATH only looks
+# inside the multilib sysroot.  Fix this by explicitly adding the MACHINE's
+# architecture-independent pkgconfig location to PKG_CONFIG_PATH.
+PKG_CONFIG_PATH .= ":${STAGING_DIR}/${MACHINE}${datadir}/pkgconfig"