Re: Link requirements creep - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Link requirements creep
Date
Msg-id 15531.1211069975@sss.pgh.pa.us
Whole thread Raw
In response to Re: Link requirements creep  ("Marko Kreen" <markokr@gmail.com>)
Responses Re: Link requirements creep  (Andrew Dunstan <andrew@dunslane.net>)
List pgsql-hackers
"Marko Kreen" <markokr@gmail.com> writes:
> On 5/18/08, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I was displeased to discover just now that in a standard RPM build of
>> PG 8.3, psql and the other basic client programs pull in libxml2 and
>> libxslt; this creates a package dependency that should not be there
>> by any stretch of the imagination.

>> Thoughts, better ideas?

> 1. Use  -Wl,--as-needed as linker flag.  Portability unknown...
>    Can be autoconfed.

This might actually be the best solution.  OS X has a similar disease
but some trolling of the ld man page suggests that -dead_strip_dylibs
might work there.  Taking this path would amount to assuming that all
linkers we care about either have an equivalent switch or don't link
unrequired libraries in the first place.

I'll do some experimenting...
        regards, tom lane


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: windows builds hanging on regression checks
Next
From: Andrew Dunstan
Date:
Subject: Re: Link requirements creep