Set the soname when creating a shared lib
[ghc-hetmet.git] / compiler / main / DriverPipeline.hs
index 6c69307..225fc60 100644 (file)
@@ -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