From owner-freebsd-hackers@FreeBSD.ORG Sun Dec 16 14:15:18 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 5D4708AF; Sun, 16 Dec 2012 14:15:18 +0000 (UTC) (envelope-from jilles@stack.nl) Received: from mx1.stack.nl (relay02.stack.nl [IPv6:2001:610:1108:5010::104]) by mx1.freebsd.org (Postfix) with ESMTP id E6F618FC13; Sun, 16 Dec 2012 14:15:17 +0000 (UTC) Received: from snail.stack.nl (snail.stack.nl [IPv6:2001:610:1108:5010::131]) by mx1.stack.nl (Postfix) with ESMTP id 58A04358C55; Sun, 16 Dec 2012 15:15:17 +0100 (CET) Received: by snail.stack.nl (Postfix, from userid 1677) id 3AF9C2848C; Sun, 16 Dec 2012 15:15:17 +0100 (CET) Date: Sun, 16 Dec 2012 15:15:17 +0100 From: Jilles Tjoelker To: Konstantin Belousov Subject: Re: Fix overlinking in base aka import pkgconf Message-ID: <20121216141517.GA33592@stack.nl> References: <20121214235418.GF18884@ithaqua.etoilebsd.net> <20121215012233.GP71906@kib.kiev.ua> <20121215105643.GG18884@ithaqua.etoilebsd.net> <20121216130100.GD15112@felucia.tataz.chchile.org> <20121216140340.GY71906@kib.kiev.ua> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121216140340.GY71906@kib.kiev.ua> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: Baptiste Daroussin , 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: Sun, 16 Dec 2012 14:15:18 -0000 On Sun, Dec 16, 2012 at 04:03:40PM +0200, Konstantin Belousov wrote: > On Sun, Dec 16, 2012 at 02:01:00PM +0100, Jeremie Le Hen wrote: > > I think this could be solved by an implicit linker script contained in > > .so and .a files, pointing to the real libraries. > > We have already the SHLIB_LDSCRIPT variable to accomplish this for .so > > files. It may be possible to do the same for .a files, though this > > would require renaming the real archives to something like .a.0 (here > > I'm just taking a similar scheme to the one used for DSO). > > As a matter of fact, libprocstat.a would contain: > > GROUP ( /usr/lib/libprocstat.a.0 /usr/lib/libkvm.a /usr/lib/libutil.a ) > > Note that libkvm.a and libutil.a could be linker scripts as well. > > Kib, do you see any problem to this proposition? > Wouldn't you need to completely rewrite the handling of the .a files > in the share/mk ? I somewhat dislike the mere thought that .a is not > an archive any longer. > Does it make sense from the overhead and complexity POV, for such small > goal ? For base this may not make much sense since there is not much need to run an old base binary against newer base libraries. Apart from that the only advantage is some form of philosophical correctness. For ports this may be a good way to keep static linking working after fixing overlinking caused by libtool's dependency_libs in .la files. -- Jilles Tjoelker