[1901] in Kerberos_V5_Development
Re: svr4 shared libs, makeshlib and "-h" linker option in gcc
daemon@ATHENA.MIT.EDU (Ezra Peisach)
Tue Oct 29 11:59:49 1996
To: Tom Yu <tlyu@MIT.EDU>
Cc: krbdev@MIT.EDU
In-Reply-To: Your message of "Mon, 28 Oct 1996 23:38:35 EST."
<9610290438.AA04285@tesla-coil.MIT.EDU>
Date: Tue, 29 Oct 1996 11:58:54 EST
From: Ezra Peisach <epeisach@MIT.EDU>
So lets see the features and problems with all platforms:
OSF:
../../foo.so works okay
soname in library works
-L../ is also okay
No gcc vs cc problem in making library
Problem is if libdb.so exists on the system as the loaded will
search path for .so files and then again for .a.
Solaris/Sunos
../../foo.so works iff soname set in library.
-L../ will introduce problems as the path will be in the library
gcc vs suncc soname issue - probably solved with use of -h.
Netbsd:
../../foo.so will insert ../../foo.so into library BAD
I could not find soname support
rpath support present.
Looks like -L is the right thing to do
HPUX:
Special flags needed (see Bill's message)
Linux:
Unknown at this moment - need to redetermine
AIX:
Scary looking script. Need to get to a machine to test..
Summary:
Using -L is bad on solaris, but we can use ../../foo.so name
Yet, using ../../foo.so on netbsd loses and you need to use -L.
We cannot win easily at this
Therefore - options:
a) Do nothing - maybe rename libdb.a
b) Add another flag to aclocal.m4 - either use the -L method or ../ method
c) Make a script for linking that will DTRT
I am half done with (b) as I already fixed the tree to work with ../
method for shared...... but (c) might be the best solution in the long
run...
Ezra