setup_board: generalize pkg-config paths

The current logic has a few libdirs hardcoded (lib & lib64).  This fails
if the libdir is named something else (like libx32).  Tweak the pkg-config
logic so it returns all pkg-config dirs found in the target.  This won't
work if the target is multilib, but we don't have any plans to do that.

BUG=chromium-os:36866
TEST=`cbuildbot {amd64,arm,x86}-generic-full` worked

Change-Id: I1d856c86d279691e85e5794f429bd3da2eb28675
Reviewed-on: https://gerrit.chromium.org/gerrit/39050
Reviewed-by: David James <davidjames@chromium.org>
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
This commit is contained in:
Mike Frysinger 2012-12-01 16:26:48 -05:00 committed by Gerrit
parent 5ea15f8a38
commit 33776c1cae

View File

@ -106,9 +106,7 @@ generate_all_wrappers() {
sudo_clobber "${wrapper}" <<EOF
#!/bin/bash
PKG_CONFIG_LIBDIR="${BOARD_ROOT}/usr/lib/pkgconfig:\
${BOARD_ROOT}/usr/lib64/pkgconfig:\
${BOARD_ROOT}/usr/share/pkgconfig"
PKG_CONFIG_LIBDIR=\$(printf '%s:' "${BOARD_ROOT}"/usr/*/pkgconfig)
export PKG_CONFIG_LIBDIR
export PKG_CONFIG_SYSROOT_DIR="${BOARD_ROOT}"