[PATCH] Be consistent with pkg-config usage

Laurent Bercot ska-dietlibc at skarnet.org
Fri Apr 8 09:08:31 UTC 2016


On 08/04/2016 05:59, Mike Frysinger wrote:
> keep in mind that PKG_CONFIG is a tool for the *host*, not for the *build*.
> so mixing it in this way is almost assuredly wrong.  much like there is a
> HOSTCC var, you'll probably want to introduce a HOST_PKG_CONFIG var, and
> then change these files to leverage that.

  I don't understand. PKG_CONFIG is a build tool producing arch-independent
output. So it always runs on the *build* and it makes no sense to have a
host-dependent version of it.

  To tell pkg-config that it should look for host data instead of build data,
a special PKG_CONFIG_PATH should be crafted with the locations of the host .pc
files, and PKG_CONFIG_SYSROOT_DIR should be set to the host staging directory.

  Certain kernel Makefiles using PKG_CONFIG include the following line:
    PKG_CONFIG = $(CROSS_COMPILE)pkg-config

  I can only assume that when cross-compiling a kernel that needs those features,
users create a $host-pkg-config script that sets the appropriate PKG_CONFIG_PATH
and PKG_CONFIG_SYSROOT environment variables before executing the real, "native",
pkg-config.

-- 
  Laurent



More information about the busybox mailing list