[Bug ada/105507] Ada build fails for 32bit Windows

ebotcazou at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Wed May 18 22:05:59 GMT 2022


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=105507

--- Comment #5 from Eric Botcazou <ebotcazou at gcc dot gnu.org> ---
> We do have some open bugs re broken exception handling with mingw32, like
> https://github.com/msys2/MINGW-packages/issues/9289#issuecomment-945306860
> 
> Sadly no one stepped up to look into that. Do you think this could be
> related?

Possible, but the above report clearly points to pitfall #1 with DWARF
unwinding: you may *not* have more than a single libgcc in a link.  This means
that, if you link with a DLL that was linked with the (shared, that's
requuired) libgcc, you *cannot* also link with the static libgcc, because this
brings 2 libgccs in the link, you *must* link with the shared libgcc.

So the rule of thumb is to never use -static-libgcc if you have a GCC-compiled
DLL in the link, that's guaranteed to break otherwise.


More information about the Gcc-bugs mailing list