Shared libs enthusiasts, We can use ghc to link a bunch of .o files into a shared lib:
$ ghc -dynamic -shared Blah.o -o libHSblah.so The question on ELF platforms is how we should set the "soname". This name is name baked into the .so lib and used to identify the library by the dynamic linker (to tell when two other libs are talking about the same dependency). With gcc, on ELF platforms you would use: $ gcc -shared Blah.o -o libblah.so -Wl,-soname,libblah.so Now for ghc, we would normally use a soname corresponding to the package name, which usually also corresponds to the library file name. We could look at the file name given by -o, though this is a little non-standard for such tools. We could require (or at least suggest) -package-name be given when linking a shared lib. However that would involve baking in the "HS" library prefix name convention into ghc. Or we can make the caller specify the soname specifically. Suggestions? Duncan _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
