Commit 6efacfe8 authored by Duncan Coutts's avatar Duncan Coutts

Set the soname when creating a shared lib

It's still possible to override it, just use -optl-Wl,-soname, eg:
ghc -shared -dynamic foo.o -o libfoo.so -optl-Wl,-soname,libbar.so
parent fa00cc50
......@@ -1661,6 +1661,7 @@ linkDynLib dflags o_files dep_packages = do
md_c_flags
++ o_files
++ [ "-shared", "-Wl,-Bsymbolic" ] -- we need symbolic linking to resolve non-PIC intra-package-relocations
++ [ "-Wl,-soname," ++ takeFileName output_fn ] -- set the library soname
++ extra_ld_inputs
++ lib_path_opts
++ extra_ld_opts
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment