Re: [PATCH] build-sys: use pkg-config to find the libs for static build

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wednesday 12 December 2007, Stepan Kasal wrote:
> On Tue, Dec 11, 2007 at 05:54:11PM -0500, Mike Frysinger wrote:
> > executing `pkg-config` is not friendly to cross-setups.  you should use
> > AC_PATH_TOOL to setup the PKG_CONFIG environment variable and then use
> > that later on
>
> I was asking myself why "pkg-config" is not enough, the cross-compile
> case has not came to my mind.
> A small question remains: why full path?  wouldn't AC_CHECK_TOOL suffice?

the purpose of using AC_CHECK_TOOL is not for the full path.  AC_CHECK_TOOL 
provides two things:
 - allows people to explicitly set PKG_CONFIG
 - searches for the binary with a ${build}- prefix
so the cross-compile case has people creating ${build}-pkg-config wrappers 
which tell pkg-config to search the cross-compiler paths rather than the host 
paths.  i use that today with great success.

> In any case, this convinces me that using pkg.m4 is a good idea.

sure

> > >  # These default values should work in most cases:
> > >  : ${BLKID_LIBS='-lblkid'}
> > >  : ${VOLUMEID_LIBS='-lvolume_id'}
> >
> > why only go half way ?  i'd use pkg-config for everything.
>
> I don't think it is needed, AFAIK, mere "-lblkid" suffices for
> systems with GNU ld.so, as the rest is resolved by ld.so because of
> .so dependencies.

again, it probably will work in most cases, but in the cases where it wont, 
there's no way for the user to control it without editing the configure 
script.

> Until the blkid.pc is fixed (s/Requires/&.private/), the pkg-config
> version of BLKID_LIBS is even slightly worse than the fixed
> "-lblkid".  (The build won't fail, but the binaries will have
> unneeded DT_NEEDED tags.)

is this really a big deal ?

> IIRC, the Karel has said that the pkg-config description in blkid is
> relatively new; with my patch, util-linux-ng build without
> pkg-config, unless a static build is required.

so have fallback code (i seem to recall the pkg config m4 macros have that) 
when the .pc files are not available
-mike

Attachment: signature.asc
Description: This is a digitally signed message part.


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux