... | ... | @@ -15,7 +15,7 @@ There is some benefit (in terms of both bugs fixed and code removed) to removing |
|
|
Our solution is to switch GHCi from using the "static way", to using the "dynamic way". GHCi will then use the system linker to load the `.dll` for the library, rather than using the GHCi linker to load the `.a`.
|
|
|
|
|
|
|
|
|
(See [\#3658](https://gitlab.haskell.org//ghc/ghc/issues/3658) for related design decisions etc.)
|
|
|
(See [\#3658](https://gitlab.haskell.org/ghc/ghc/issues/3658) for related design decisions etc.)
|
|
|
|
|
|
|
|
|
For this to work, there is technically no need to change anything else: ghc could continue to compile for the static way by default. However, there are 2 problems that arise:
|
... | ... | @@ -49,7 +49,7 @@ We do not know the situation with other platforms, such as iOS and Android. We d |
|
|
## Bugs
|
|
|
|
|
|
|
|
|
As well as the [ticket for implementing dynamic-by-default (\#3658)](https://gitlab.haskell.org//ghc/ghc/issues/3658), the table below lists the related tickets and the platforms that they affect. Most, if not all, of these would be immediately fixed by switching to dynamic-by-default.
|
|
|
As well as the [ticket for implementing dynamic-by-default (\#3658)](https://gitlab.haskell.org/ghc/ghc/issues/3658), the table below lists the related tickets and the platforms that they affect. Most, if not all, of these would be immediately fixed by switching to dynamic-by-default.
|
|
|
|
|
|
<table><tr><th>Ticket</th>
|
|
|
<th>Affects OS X x86_64?</th>
|
... | ... | @@ -60,7 +60,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>Affects Windows x86?</th>
|
|
|
<th>Affects other platforms?
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/781">#781 GHCi on x86_64, cannot link to static data in shared libs</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/781">#781 GHCi on x86_64, cannot link to static data in shared libs</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th><b>YES</b></th>
|
... | ... | @@ -69,7 +69,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/1883">#1883 GHC can't find library using "short" name</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/1883">#1883 GHC can't find library using "short" name</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -78,7 +78,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/2283">#2283 WIndows: loading objects that refer to DLL symbols</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/2283">#2283 WIndows: loading objects that refer to DLL symbols</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -87,7 +87,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/3242">#3242 ghci: can't load .so/.DLL for: m (addDLL: could not load DLL)</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/3242">#3242 ghci: can't load .so/.DLL for: m (addDLL: could not load DLL)</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -96,7 +96,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/3654">#3654 Mach-O GHCi linker lacks support for a range of relocation entries</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/3654">#3654 Mach-O GHCi linker lacks support for a range of relocation entries</a></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th>no</th>
|
... | ... | @@ -105,7 +105,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/4244">#4244 Use system linker in GHCi to support alpha, ia64, ppc64</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/4244">#4244 Use system linker in GHCi to support alpha, ia64, ppc64</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -114,7 +114,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th><b>YES</b>
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/5062">#5062 Patch: Debug output for OS X linker and coding standard upgrades</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/5062">#5062 Patch: Debug output for OS X linker and coding standard upgrades</a></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th>no</th>
|
... | ... | @@ -123,7 +123,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/5197">#5197 Support static linker semantics for archives and weak symbols</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/5197">#5197 Support static linker semantics for archives and weak symbols</a></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
... | ... | @@ -132,7 +132,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b>
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/5435">#5435 GHCi linker should run constructors for linked libraries</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/5435">#5435 GHCi linker should run constructors for linked libraries</a></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
... | ... | @@ -141,7 +141,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b>
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/6107">#6107 GHCi runtime linker cannot link with duplicate common symbols</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/6107">#6107 GHCi runtime linker cannot link with duplicate common symbols</a></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
... | ... | @@ -150,7 +150,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b>
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7043">#7043 32-bit GHC ceiling of negative float SEGFAULT: 11</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7043">#7043 32-bit GHC ceiling of negative float SEGFAULT: 11</a></th>
|
|
|
<th>no</th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th>no</th>
|
... | ... | @@ -159,7 +159,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7056">#7056 GHCi loadArchive "libiconv.a":failed Unknown PEi386 section name `.drectve'</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7056">#7056 GHCi loadArchive "libiconv.a":failed Unknown PEi386 section name `.drectve'</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -168,7 +168,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7072">#7072 GHC interpreter does not find stat64 symbol on Linux</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7072">#7072 GHC interpreter does not find stat64 symbol on Linux</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th><b>YES</b></th>
|
... | ... | @@ -177,7 +177,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7097">#7097 linker fails to load package with binding to foreign library</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7097">#7097 linker fails to load package with binding to foreign library</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -186,7 +186,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7103">#7103 Compiler panic, when loading wxc in GHCi</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7103">#7103 Compiler panic, when loading wxc in GHCi</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -195,7 +195,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th><b>YES</b></th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7134">#7134 ghc-7.6.0.20120810-x86_64-windows.exe -> internal error R_X86_64_PC32</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7134">#7134 ghc-7.6.0.20120810-x86_64-windows.exe -> internal error R_X86_64_PC32</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -204,7 +204,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7207">#7207 linker fails to load package with binding to foreign library (win64)</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7207">#7207 linker fails to load package with binding to foreign library (win64)</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -213,7 +213,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7299">#7299 threadDelay broken in ghci, Mac OS X</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7299">#7299 threadDelay broken in ghci, Mac OS X</a></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th><b>YES</b></th>
|
|
|
<th>no</th>
|
... | ... | @@ -222,7 +222,7 @@ As well as the [ticket for implementing dynamic-by-default (\#3658)](https://git |
|
|
<th>no</th>
|
|
|
<th>no
|
|
|
</th></tr>
|
|
|
<tr><th><a href="https://gitlab.haskell.org//ghc/ghc/issues/7357">#7357 GHC.exe gives an internal error while linking vector's Monadic.hs</a></th>
|
|
|
<tr><th><a href="https://gitlab.haskell.org/ghc/ghc/issues/7357">#7357 GHC.exe gives an internal error while linking vector's Monadic.hs</a></th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
|
|
<th>no</th>
|
... | ... | @@ -804,7 +804,7 @@ It would still be possible to compile programs using the "static way" by giving |
|
|
### Cabal support
|
|
|
|
|
|
|
|
|
Currently released versions of Cabal/cabal-install don't handle dynamic-by-default GHCs well, as they don't pass the `-static` flag when building for static ways (as they assume that it is enabled by default). We should get fixed versions out as soon as possible ([\#7439](https://gitlab.haskell.org//ghc/ghc/issues/7439)).
|
|
|
Currently released versions of Cabal/cabal-install don't handle dynamic-by-default GHCs well, as they don't pass the `-static` flag when building for static ways (as they assume that it is enabled by default). We should get fixed versions out as soon as possible ([\#7439](https://gitlab.haskell.org/ghc/ghc/issues/7439)).
|
|
|
|
|
|
### Profiling
|
|
|
|
... | ... | |