... | ... | @@ -63,7 +63,11 @@ Should it be possible to override a symbol defined in a Haskell package? In that |
|
|
Do we need to support static libraries in a dynamic GHCi? (SM: not necessarily) (PT: Good!)
|
|
|
|
|
|
|
|
|
Theoretically, in ELF there should be no difference between a statically linked and a dynamically linked GHCi. (SM: you need to elaborate here. There are big differences between the two: they load different libraries, use different linkers, etc.) (PT: The current situation is GHCi dynamically linked the use system linker, GHCi statically linked use RTS linker. I think at least on ELF systems you could have a statically linked GHCi and still use the system linker to load dynamic Haskell libraries. Is there anything in the Haskell runtime that would prevent that?)
|
|
|
Theoretically, in ELF there should be no difference between a statically linked and a dynamically linked GHCi.
|
|
|
|
|
|
- SM: you need to elaborate here. There are big differences between the two: they load different libraries, use different linkers, etc.)
|
|
|
- PT: The current situation is GHCi dynamically linked the use system linker, GHCi statically linked use RTS linker. I think at least on ELF systems you could have a statically linked GHCi and still use the system linker to load dynamic Haskell libraries. Is there anything in the Haskell runtime that would prevent that?
|
|
|
- SM: On Windows we can't mix dynamic and static Haskell code on the same runtime because there are representation differences. On ELF systems the symbols of the RTS have to be exposed to the dynamic linker, so if the RTS were static you would at the very least have to link it with `--export-dynamic` when linking GHC.
|
|
|
|
|
|
|
|
|
SM: We now have [RemoteGHCi](remote-gh-ci), which means that it will become irrelevant whether GHCi itself is dynamically linked or not, and we'll be able to choose when we start GHCi whether we use dynamic linking or not. You can try this out: `ghci -fexternal-interpreter -static` uses static linking, and `ghci -fexternal-interpreter -dynamic` uses dynamic linking. (PT: I would still like to get dynamic linking to work for platforms where we don't have an RTS linker but still want a statically linked GHCi so we can avoid the overhead of creating a separate process. If it cannot be done at least I would like to understand why.)
|
... | ... | |