Re: Reduce dependancies of postmaster (without --as-needed)

From: Martijn van Oosterhout <kleptog(at)svana(dot)org>
To: pgsql-patches(at)postgresql(dot)org
Subject: Re: Reduce dependancies of postmaster (without --as-needed)
Date: 2005-11-28 08:31:38
Message-ID: 20051128083129.GA31262@svana.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches

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(at)svana(dot)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.

In response to

Responses

Browse pgsql-patches by date

  From Date Subject
Next Message Alvaro Herrera 2005-11-28 11:21:50 Re: Reduce dependancies of postmaster (without --as-needed)
Previous Message Volkan YAZICI 2005-11-27 21:47:45 Re: Case Conversion Fix for MB Chars