From owner-freebsd-hackers@FreeBSD.ORG Sat Dec 15 01:22:38 2012 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id A6546DEE; Sat, 15 Dec 2012 01:22:38 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from kib.kiev.ua (kib.kiev.ua [IPv6:2001:470:d5e7:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 0DDAE8FC13; Sat, 15 Dec 2012 01:22:37 +0000 (UTC) Received: from tom.home (kostik@localhost [127.0.0.1]) by kib.kiev.ua (8.14.5/8.14.5) with ESMTP id qBF1MYqF075014; Sat, 15 Dec 2012 03:22:34 +0200 (EET) (envelope-from kostikbel@gmail.com) DKIM-Filter: OpenDKIM Filter v2.7.3 kib.kiev.ua qBF1MYqF075014 Received: (from kostik@localhost) by tom.home (8.14.5/8.14.5/Submit) id qBF1MYoW075013; Sat, 15 Dec 2012 03:22:34 +0200 (EET) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: tom.home: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 15 Dec 2012 03:22:34 +0200 From: Konstantin Belousov To: Baptiste Daroussin Subject: Re: Fix overlinking in base aka import pkgconf Message-ID: <20121215012233.GP71906@kib.kiev.ua> References: <20121214235418.GF18884@ithaqua.etoilebsd.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="nVYOjVWOcH+Ezkzp" Content-Disposition: inline In-Reply-To: <20121214235418.GF18884@ithaqua.etoilebsd.net> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-2.0 required=5.0 tests=ALL_TRUSTED,BAYES_00, DKIM_ADSP_CUSTOM_MED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on tom.home Cc: hackers@freebsd.org X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Dec 2012 01:22:38 -0000 --nVYOjVWOcH+Ezkzp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Dec 15, 2012 at 12:54:19AM +0100, Baptiste Daroussin wrote: > Hi, >=20 > 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 ? >=20 > On proposition could be to use pkgconf https://github.com/pkgconf/pkgconf= which > is BSD license pkg-config implementation 100% compatible with pkg-config. >=20 > What I propose is to create a new PCADD variable for the Makefiles. >=20 > PCADD will invoke pkgconf to gather the libraries and the cflags for a gi= ven > project. >=20 > The second thing would be to create .pc files for all of our libraries. >=20 > 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. --nVYOjVWOcH+Ezkzp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iQIcBAEBAgAGBQJQy9DYAAoJEJDCuSvBvK1BiCAP/3zRx2QSKw5BRn5TQzdJnjQi Tnq//KcfGrtD2fbjdICriYIrWePINSskxQIZsTXvGxLK0QhPFtPIsiqwkFLdUg8G 5H2WPp1NdV5eMwy/y8S3XfZRlj7HX0UMOH3AFa6qfGp0CURDRgsD6ixA5Cc5oJPj WjhytEKk3XM9dvI5+Usj0L7Q1IDtGVVVctCdbAL+6SVq2AT7q4DeCgfR2ZY7KUD2 lkVJwXGX8EwWHMU31vqR0ty0oL0aN8tdLTwsoT6u2VjFpTSJn6YdlgEuuJIKfckR a2nnV0fZ7ja8t2RDzXbUCIbD6BvDwaeyNBSnT4w7dBCsKHSlBpbUDF8a9RvFbKtb 6N+F6GRWqeuoICW/D5JmOUTWk5sn5cr4rrtVG3/EKzmXTb7nxEfD2H1x1fuQ9EV9 JqJRkfjwHqJXXAyBZMs6+mv9/aFK4dj7cB5tZLXzerk/tlLmkjBvCn3M8loT6D4p 9A3a2OBhw9ytjulaxntNyAFo2Y1sYUXet+hHZ3qrsngny5ZdspsfJRaet8L7bbKr h2V91CEsZ0yP5UZ9zkZ/4c2TS+LE/QEPDSamUWgGLSTByCZ8+qGOTE5/eVNevERm hzdaIC+4nRW9LXyVjEQL6dVTQhhE5Ka+skaKP3Fze1wmFFIO/vX8pmbeUngLbbOi ZmJayDL/44C9dGwmlu1I =HTJx -----END PGP SIGNATURE----- --nVYOjVWOcH+Ezkzp--