projects
/
ghc-hetmet.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fa00cc5
)
Set the soname when creating a shared lib
author
Duncan Coutts
<duncan@well-typed.com>
Fri, 15 May 2009 20:37:30 +0000
(20:37 +0000)
committer
Duncan Coutts
<duncan@well-typed.com>
Fri, 15 May 2009 20:37:30 +0000
(20:37 +0000)
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
compiler/main/DriverPipeline.hs
patch
|
blob
|
history
diff --git
a/compiler/main/DriverPipeline.hs
b/compiler/main/DriverPipeline.hs
index
6c69307
..
225fc60
100644
(file)
--- 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