gcc-4.4-20081003 and later configured with --disable-shared for mingw32 attempt to link with libgcc_eh.a even though it never built libgcc_eh.a (those object files are included in libgcc.a):
/home/mikpe/gcc-4.4-20081031/configure --target=x86_64-pc-mingw32 --prefix=/tmp/cross-mingw64 --disable-nls --disable-shared --enable-threads=win32 --enable-languages=c --with-gmp=/opt/local/gmp-4.2.4 --with-mpfr=/opt/local/mpfr-2.3.2 --disable-win32-registry --enable-sjlj-exceptions make make install echo "int main(void) { return 0; }" > trivial.c /tmp/cross-mingw64/bin/x86_64-pc-mingw32-gcc trivial.c /tmp/cross-mingw64/lib/gcc/x86_64-pc-mingw32/4.4.0/../../../../x86_64-pc-mingw32/bin/ld: cannot find -lgcc_eh collect2: ld returned 1 exit status The fix for PR37528 changed mingw32.h to #define REAL_LIBGCC_SPEC, and it also changed it to unconditionally link with -lgcc_eh for !shared-libgcc. That only works if libgcc_eh.a actually was built, which isn't the case when gcc was configured with --disable-shared. -- Summary: PR37528 fix broke --disable-shared on mingw32 Product: gcc Version: 4.4.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: c AssignedTo: unassigned at gcc dot gnu dot org ReportedBy: mikpe at it dot uu dot se GCC build triplet: i686-pc-cygwin GCC host triplet: i686-pc-cygwin GCC target triplet: x86_64-pc-mingw32 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37989