Fix overlinking in base aka import pkgconf
Jilles Tjoelker
jilles at stack.nl
Sun Dec 16 14:15:18 UTC 2012
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
More information about the freebsd-hackers
mailing list