This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug driver/10590] [sparc][solaris] "-static -shared" unsupported using solaris linker


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10590



------- Additional Comments From christopher at currie dot com  2003-07-22 20:29 -------
I agree that "-shared -static" is a confusing set of flags, but the intended
goal is to 

a) Create a shared library. (hence "-shared")
b) Link in other libraries using static linkage. (hence "-static").

This is to guarantee that the shared library created doesn't depend on any
shared versions of libraries that we might need to link in. Obviously, we could
substitute "-Wl,-Bstatic" for "-static", but if that's the case, perhaps
"-shared" and "-static" should be mutually exclusive? If not, then I'd like to
see the compiler driver fixed to support the combination.

FWIW, I don't think the Solaris linker has a flag that directly allows this
combination. A solution would be to eliminate "-dn" (since "-Bstatic" is already
being supplied), but then this could be overriden with later occurences of
"-Wl,-Bdynamic" from the user. If this is the expected behavoir of "-static,"
then perhaps this needs additional documentation to state this. I know that this
is difficult given the numerous different linkers that GCC must support. Perhaps
the easiest thing to do is to drop "-static" altogether.

Thanks for your time,
Christopher


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]