Fix overlinking in base aka import pkgconf

Konstantin Belousov kostikbel at gmail.com
Sat Dec 15 01:22:38 UTC 2012


On Sat, Dec 15, 2012 at 12:54:19AM +0100, Baptiste Daroussin wrote:
> Hi,
> 
> Some of our binary are overlinked, the way we handle the linking doesn't help
> for that.
What do you mean there ? Do you mean that some libraries specified for the
linking stage of the final binary are not needed for the execution ?

> 
> On proposition could be to use pkgconf https://github.com/pkgconf/pkgconf which
> is BSD license pkg-config implementation 100% compatible with pkg-config.
> 
> What I propose is to create a new PCADD variable for the Makefiles.
> 
> PCADD will invoke pkgconf to gather the libraries and the cflags for a given
> project.
> 
> The second thing would be to create .pc files for all of our libraries.
> 
> for example:
> usr.bin/fstat dynamic build is overlinked
And how this is better than just removing the unneeded library from
the Makefile ?

For the port consumption, I believe that the better solution is to provide
a pack of the .pc files describing base libraries, most likely as port.

Using .pc for the base system build is overkill, it does not add anything
that cannot be accomplished by our existing build system. IMO.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 834 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20121215/07be1d41/attachment.sig>


More information about the freebsd-hackers mailing list