This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: -Bstatic & -shared problems / some solution
- From: bert hubert <ahu at ds9a dot nl>
- To: binutils at sources dot redhat dot com
- Date: Tue, 16 Apr 2002 13:54:26 +0200
- Subject: Re: -Bstatic & -shared problems / some solution
- References: <20020416125942.A17174@outpost.ds9a.nl>
[post from a non-subscriber, please cc. thanks]
On Tue, Apr 16, 2002 at 12:59:42PM +0200, bert hubert wrote:
> So I try this:
>
> g++ -L/opt/postgresql/lib
> -Wl,-Bstatic -lssl -lcrypt -lcrypto -lpq++ -lpq -Wl,-Bdynamic -Wl,-soname
> -Wl,libgpsqlbackend.so.0 -shared -o libgpgsqlbackend.so pgsqlbackend.o
If I execute this:
ar x /opt/postgresql/lib/libpq++.a $(ar t /opt/postgresql/lib/libpq++.a)
ar x /opt/postgresql/lib/libpq.a $(ar t /opt/postgresql/lib/libpq.a)
And replace the 'pgsqlbackend.o' above by '*.o', I get a working .so
that does not depend on any pgsql .so's.
But it strikes me that ld should have been able to perform this magic by
itself.
Might this be a bug?
Regards,
bert
--
http://www.PowerDNS.com Versatile DNS Software & Services
http://www.tk the dot in .tk
http://lartc.org Linux Advanced Routing & Traffic Control HOWTO