Add -fcompact-unwind
This gives users the choice to enable __compact_unwind sections when linking. These were previously hardcoded to be removed. This can be used to solved the problem "C++ does not catch exceptions when used with Haskell-main and linked by ghc", #11829 It does not change the default behavior, because I can not estimate the impact this would have. When Apple first introduced the compact unwind ABI, a number of open source projects have taken the easy route of disabling it, avoiding errors or even just warnings shortly after its introduction. Since then, about a decade has passed, so it seems quite possible that Apple itself, and presumably many programs with it, have successfully switched to the new format, to the point where the old __eh_frame section support is in disrepair. Perhaps we should get along with the program, but for now we can test the waters with this flag, and use it to fix packages that need it.
Showing
- compiler/GHC/Driver/Flags.hs 1 addition, 0 deletionscompiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs 6 additions, 0 deletionscompiler/GHC/Driver/Session.hs
- compiler/GHC/Linker/Static.hs 2 additions, 1 deletioncompiler/GHC/Linker/Static.hs
- docs/users_guide/phases.rst 14 additions, 0 deletionsdocs/users_guide/phases.rst
Loading
Please register or sign in to comment