On Sun, Nov 27, 2005 at 06:30:59PM -0300, Alvaro Herrera wrote:
> Martijn van Oosterhout wrote:
> > Attached is a patch which applies this filtering to the backend and has
> > the same results as linking with --as-needed. I basically took the
> > filter list of libpq and altered it as follows:
> > 
> > libs removed: -lnsl -lresolv
> > libs added: -ldl -lm
> Hmm, we don't need -ldl?  How do we implement OPEN etc if not without
> dlopen()?  [looks around]  I see this is with pg_dlopen which in turn is
> dlopen in Linux and others.  Did you try contrib's regression test?
> plperl's?

??? I added -ldl, I didn't remove it. Note, it uses $(filter) which
removes things not in the list. Maybe you're thinking of $(filter-out)?
None of this affects contrib or plperl because they use completely
different link lines.

I've been thinking about -lnsl and -lresolv and it occurred to me that
maybe on some platforms they are needed. However, on Linux they are
100% redundant. There -lnsl provides functions for NIS and YP and
-lresolv provides functions for making your own DNS packets, neither of
which PostgreSQL does. Unfortunatly the autoconf test doesn't look for
a particular function it simply includes the lib if it is present. Does
anyone remember what required functions are provided by these libs?

Have a nice day,
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patent. n. Genius is 5% inspiration and 95% perspiration. A patent is a
> tool for doing 5% of the work and then sitting around waiting for someone
> else to do the other 95% so you can sue them.

Attachment: pgpFSKgl5pVE1.pgp
Description: PGP signature

Reply via email to