https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64900
--- Comment #3 from Ian Lance Taylor <ian at airs dot com> --- Unfortunately that patch breaks the build on x86 GNU/Linux. The problem is that the split-stack support (the __morestack symbol) must be linked into the shared library directly, not via -lgcc_s. So it's necessary to link with -lgcc also. The correct link on x86 GNU/Linux is -lgcc -lgcc_s, but using -shared-libgcc only links with -lgcc_s. I think -lgcc -lgcc_s should also work on x86 Solaris, as the problematic symbol is in -lgcc_eh, not -lgcc. But I'm not sure about the best way to get that, as not all systems support -lgcc_s.