Re: Use of zlib - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Use of zlib
Date
Msg-id 26037.1095950934@sss.pgh.pa.us
Whole thread Raw
In response to Re: Use of zlib  (Peter Eisentraut <peter_e@gmx.net>)
Responses Re: Use of zlib  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
Peter Eisentraut <peter_e@gmx.net> writes:
> Am Donnerstag, 23. September 2004 13:02 schrieb Thomas Hallgren:
>> From what I can understand from the documentation, the only utility in
>> PostgreSQL that actually uses zlib is pg_dump? If so, why is the
>> postgres process linked with -lz?

> Because we are too lazy to fine-tune the build system for cases like this.  

I was just reading about a linker option (--as-needed or something like
that) that exists in more recent versions of the GNU linker.  It means
"only link the libraries actually referenced".  Applying this or local
equivalent where available would seem like a fairly painless way to
solve the problem, at least on some platforms.

I agree that trying to keep track of the set of libraries really needed
for each executable would be a hopeless task, but if we can make the
linker fix it for us ...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: NOFIXADE / NOPRINTADE
Next
From: Tom Lane
Date:
Subject: Re: SQL-Invoked Procedures for 8.1