[GHC] #9498: GHC links against unversioned .so files
GHC
ghc-devs at haskell.org
Fri Jan 15 15:28:03 UTC 2016
#9498: GHC links against unversioned .so files
-------------------------------------+-------------------------------------
Reporter: Kritzefitz | Owner:
Type: feature request | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.6.3
(Linking) |
Resolution: | Keywords: Debian
Operating System: Linux | Architecture:
| Unknown/Multiple
Type of failure: Other | Test Case:
Blocked By: 10458 | Blocking: 9237
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by trommler):
Replying to [comment:25 simonmar]:
> > Is the C library going to be a static (archive) or a dynamic (shared
object) library?
>
> Usually both, so that you can use `-optl-static` if you want. The
`-dev` package of a C library normally includes both the unversioned `.so`
and the `.a`.
>
> Remember that GHC links static Haskell packages but dynamic C libraries
by default.
Static Haskell with dynamic C is the issue that I want to address in
comment:16
>
[...]
> Did you know the code in `Linker.lhs` is only used for GHCi and not
linking of standalone executables? I have a suspicion that there's some
confusion here. There is no "dummy SO" when linking a standalone
executable.
Sorry, this is indeed confusing. This dummy SO is not the same as the
dummy SO in #10458.
Let me call the #11458 dummy SO "GHCi dummy SO" and the one in comment:16
"package dummy SO". The package dummy SO belongs to a Haskell package and
is installed next to the static (`libHS*.a`) and the dynamic (`libHS*.so`)
Haskell library.
Then the package dummy SO would be used in the static Haskell dynamic C
case in GHCi only. We could do this to help user's that are in the
situation described in this ticket. On the other hand we could include the
essence of your comment:19 "GHCi works like ld" in the user's guide
(Section 2.6.2?). Perhaps we can discuss this in [wiki:LinkingHaskell]
When linking a static executable a static executable then all C dev
dependencies are required. That is
no different from linking a C executable.
>
> Since you have a design in mind, maybe it would be good to flesh it out
in a wiki page so we can discuss with more precision?
I created [wiki:LinkingHaskell]
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9498#comment:26>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list