Skip to content

Add -fcompact-unwind to fix C++ exceptions on macOS (#11829)

Robert Hensing requested to merge roberth/ghc:compact-unwind into master

Hi, this is my first MR here. I hope I'm doing this right.

This MR gives users the choice to enable __compact_unwind sections when linking. These were previously hardcoded to be removed.

This can be used to solve #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.

TODO

Edited by Robert Hensing

Merge request reports