diff options
author | Duncan Coutts <duncan@well-typed.com> | 2009-05-15 20:37:30 +0000 |
---|---|---|
committer | Duncan Coutts <duncan@well-typed.com> | 2009-05-15 20:37:30 +0000 |
commit | 6efacfe8bcbe66dfc3b52397ccbd34a58890520d (patch) | |
tree | 8524c03d0b4fe2b68651b9cc716d7ea3fe724d42 /compiler | |
parent | fa00cc50ecd1aa292657720b7594b7bdb82c970c (diff) | |
download | haskell-6efacfe8bcbe66dfc3b52397ccbd34a58890520d.tar.gz |
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
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/main/DriverPipeline.hs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/compiler/main/DriverPipeline.hs b/compiler/main/DriverPipeline.hs index 6c6930713d..225fc6007e 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 |