[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: [PATCH] Be consistent with pkg-config usage
From:       Mike Frysinger <vapier () gentoo ! org>
Date:       2016-04-08 16:58:42
Message-ID: 20160408165842.GC6588 () vapier ! lan
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On 08 Apr 2016 11:08, Laurent Bercot wrote:
> 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.

sorry, but this is incorrect.  the output of pkg-config goes directly into
the link lines.  for busybox, we use it to look up selinux deps, and prob
should also be leveraging libtirpc (but i've been lazy about fixing that).
either way, the output is completely toolchain-specific.

to that end, people will often set PKG_CONFIG to point to a wrapped version
that targets their cross-compiling toolchain.

>   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.

and now you've broken the build.  the settings used to build the build tools
(i.e. kconfig) should not be the same settings used to build the host tool
(i.e. busybox).  there's no guarantee nor requirement that the set of libs
available for your build toolchain match (version/existence/etc...) the set
of libs available for your host toolchain (i.e. cross-compiler).
-mike

["signature.asc" (application/pgp-signature)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic