https://gcc.gnu.org/bugzilla/show_bug.cgi?id=85298
Bug ID: 85298 Summary: relocation errors on windows when linking C code to libstdc++ built with weakrefs Product: gcc Version: 6.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: rkitover at gmail dot com Target Milestone: --- Apologies in case this is a known issue, I was encouraged to report this to gcc proper. See discussion here: https://github.com/Alexpux/MINGW-packages/issues/1580 The issue happens when linking C code such as ffmpeg to other libs that use libstdc++, then you get a bunch of "relocation truncated to fit" error messages. Disabling weakrefs in libstdc++ fixes the issue, as is done in this patch: https://github.com/Alexpux/MINGW-packages/blob/master/mingw-w64-gcc/0016-disable-weak-refs-in-libstdc%2B%2B.patch The issue still affects gcc 7.3.0 and starts with gcc 6.0 .