Commit 0e2ee97
committed
Fix SIGILL when running ext-interpreter directly
If the external interpreter is dynamically compiled with -fPIC, then the
libraries we load must also be compiled with -fPIC.
GHC/the debugger determines whether to ask the external interpreter to
`LoadArchive` vs. `LoadDLL` based on `iservConfDynamic`. We were
accidentally hardcoding this to `False`, so we were always loading
static archives for package dependencies (-fno-PIC on Linux), even if
the external interpreter was dynamic (-fPIC).
Now, we set `iservConfDynamic` to `hostIsDynamic`, since the debugger
and ext-interp share the same executable.
This didn't trigger on macOS because, for macOS, static archives are
always compiled with -fPIC.
See Note [Dynamic dependencies for dynamic debugger]1 parent 72a6dfa commit 0e2ee97
1 file changed
Lines changed: 24 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
88 | 88 | | |
89 | 89 | | |
90 | 90 | | |
| 91 | + | |
91 | 92 | | |
92 | 93 | | |
93 | 94 | | |
| |||
584 | 585 | | |
585 | 586 | | |
586 | 587 | | |
587 | | - | |
| 588 | + | |
588 | 589 | | |
589 | | - | |
590 | | - | |
591 | | - | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
592 | 594 | | |
593 | 595 | | |
594 | 596 | | |
| |||
710 | 712 | | |
711 | 713 | | |
712 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
| 732 | + | |
713 | 733 | | |
714 | 734 | | |
715 | 735 | | |
| |||
0 commit comments