[GHC] #9498: GHC links against unversioned .so files
GHC
ghc-devs at haskell.org
Sat May 30 09:42:57 UTC 2015
#9498: GHC links against unversioned .so files
-------------------------------------+-------------------------------------
Reporter: Kritzefitz | Owner: trommler
Type: feature request | Status: new
Priority: low | Milestone:
Component: Compiler (FFI) | Version: 7.6.3
Resolution: | Keywords: Debian
Operating System: Linux | Architecture:
Type of failure: Other | Unknown/Multiple
Blocked By: | Test Case:
Related Tickets: | Blocking:
| Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by trommler):
* owner: => trommler
Comment:
Replying to [comment:7 thomie]:
> You're right!
>
> curl's cabal file would still contain `extra-libraries: curl`. But when
installing curl, whoever decides the parameters for the ghc-pkg file
(either cabal or ghc, I don't know at the moment) could ask the linker
which version it actually found, and write `extra-libraries:
:libcurl.so.<version>` to the ghc-pkg file.
I think it is sufficient for GHCi to link against
`libHScurl<something>.so` (the Haskell library) and omit `-lcurl` (the C
library) from the `ld` command altogether. This would make the linking of
dynamic libraries way more efficient as fewer shared libraries need to be
opened and fewer symbol tables need to be read.
See p 41 of Ulrich Drepper's "How To Write Shared Libraries"
http://www.akkadia.org/drepper/dsohowto.pdf.
I am going to look into this.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9498#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list