From: Duncan Coutts Date: Fri, 15 May 2009 20:37:30 +0000 (+0000) Subject: Set the soname when creating a shared lib X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=6efacfe8bcbe66dfc3b52397ccbd34a58890520d 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 --- diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 6c69307..225fc60 100644 --- a/compiler/main/DriverPipeline.hs +++ b/compiler/main/DriverPipeline.hs @@ -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