• Tomasz Figa's avatar
    Always honor pkg-config command coming from the user · cf2215de
    Tomasz Figa authored
    When building from within a ChromiumOS chroot (and any other
    Gentoo-base system), the right command to call pkg-config is specified
    up front and needs to be honored. However currently Chromium build
    system always calls 'pkg-config' directly if --sysroot is given to the
    build. This ignores any necessary setup done by the board sysroot
    pkg-config wrapper used on ChromiumOS and causes host's paths being
    pulled into the build. Precisely, PKG_CONFIG_PATH is not being unset and
    PKG_CONFIG_SYSROOT_DIR is not being set to the sysroot path.
    
    Fix this by always using the specified pkg-config binary, even if
    sysroot is given. Even though, the problem could be fixed up by adding
    necessary setup to Chromium's pkg-config wrapper, it is not the right
    solution, as the setup is inherently sysroot specific and only the
    external build system is aware of necessary configuration to be done.
    
    Bug: 743366
    Test: Build chromeos-chrome with host's /usr/lib64/pkgconfig/dbus-1.pc chmodded to a-r.
    Change-Id: I6e80dbaa94510e31aa5000c6cc31ca32b5e5cbe4
    Reviewed-on: https://chromium-review.googlesource.com/572666Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
    Commit-Queue: Tomasz Figa <tfiga@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#487005}
    cf2215de
pkg-config.py 7.51 KB