On Wed, 17 Oct 2001, Peter Eisentraut wrote:
> Denis A Ustimenko writes:
>
> [change -Wl,-R to -R and -Wl,-h to -h]
>
> I'm having a difficult time understanding this. Both -R and -h are linker
> options, not compiler options. So while the compiler driver might be nice
Oh, no Peter:
denis@tracer$ CC -help|grep "\-h"
-h<name> Assign <name> to generated dynamic shared library
-help Same as -xhelp=flags
denis@tracer$ CC -help|grep "\-R"
-R<p>[:<p>...] Build runtime search path list into executable
denis@tracer$ cc -flags|grep "\-h"
-h <name> Assign <name> to generated dynamic shared library
denis@tracer$ cc -flags|grep "\-R"
-R<dir[:dir]> Build runtime search path list into executable
> enough to recognize them as the former and pass them through, this change
> just pushes these chances, and it doesn't add any theoretical change of
> functionality.
>
> So, if you want this to be fixed, you're going to have to start with
> explaining your problem, and then we can start looking for solutions.
The problem is simple. I can't compile libpq++.so with latest Sun's
compiler:
$ make
.........
CC -KPIC -G -Wl,-h,libpq++.so.3 pgconnection.o pgdatabase.o pgtransdb.o
pgcursordb.o pglobject.o -L../../../src/interfaces/libpq -lpq -lm -lc
-Wl,-R/usr/local/pgsql/lib -o libpq++.so.3.1
CC: Warning: Option -Wl,-h,libpq++.so.3 passed to ld, if ld is invoked,
ignored otherwise
CC: Warning: Option -Wl,-R/usr/local/pgsql/lib passed to ld, if ld is
invoked, ignored otherwise
/usr/ccs/bin/ld: illegal option -- W
/usr/ccs/bin/ld: illegal option -- W
usage: ld [-6:abc:d:e:f:h:il:mo:p:rstu:z:B:D:F:GI:L:M:N:P:Q:R:S:VY:?]
file(s) [-64] enforce a 64-bit link-edit
.........
But "CC -KPIC -G -h libpq++.so.3 ... -R/usr/local/pgsql/lib ..."
works fine for me.
Regards
Denis Ustimenko