Change to DSO-linking semantics of the compiler

Jussi Lehtola jussilehtola at fedoraproject.org
Wed Jan 13 20:20:05 UTC 2010


On Wed, 2010-01-13 at 10:52 -0800, Roland McGrath wrote:
> > ----- "Jussi Lehtola" <jussilehtola at fedoraproject.org> wrote:
> > > 
> > > So is --as-needed within the current default flags?
> > 
> > As far as I know, no. The default will still be --no-as-needed.
> 
> That's correct.  This change does not affect --as-needed at all.
> 
> > The --as-needed flag will link libraries if
> > A) they define symbols required by object files
> > B) those symbols are still undefined when the library is checked
> 
> That's correct.  In other words, the libfoo.so DSO will only be used at
> runtime if the presence of -lfoo at link time actually had any effect on
> what symbols got resolved to what.  But --as-needed is not really apropos
> in this thread.

OK, if RPM picks only the libraries that are actually used in
auto-requires, then there's no connection. Otherwise the situation would
be a whole lot different, since the requires might have some bloat.
-- 
Jussi Lehtola
Fedora Project Contributor
jussilehtola at fedoraproject.org



More information about the devel mailing list