Symbol conflicts when building a MinGW binary with exceptions and -static-libgcc

Kevin Kofler kevin.kofler at chello.at
Tue Nov 13 21:43:24 UTC 2012


Hi,

when trying to build a DLL (I think it'd be the same thing with an EXE though) 
with the -static-libgcc flag using the mingw-w64 cross-compiler in the Fedora 
17 repository, I ran into symbol conflicts between libgcc_eh.a and libgcc_s.a: 
there are errors about multiple definitions of several "_Unwind_*" symbols. 
Unfortunately, the code uses exceptions, so -fno-exceptions is not an option.

http://tdm-gcc.tdragon.net/development says that TDM-GCC (maintainer CCed) has 
a local patch for what appears to be this same issue:
> Includes a patch which reintegrates the code from libgcc_eh.a into libgcc.a
> and the libgcc DLL. As long as the shared memory region is used to handle
> exceptions, this library is unnecessary, and it causes multiple definition
> errors for the symbols in it because it hasn't been added to binutils'
> exception libraries yet.
Therefore I am asking whether we can get that fix (or some other fix for this 
bug):
1. into the Fedora mingw64-gcc packaging and
2. into upstream GCC?

        Kevin Kofler


More information about the mingw mailing list