2014-04-23 Nick Clifton * config/i386/cygwin.h (ENDFILE_SPEC): Include default-manifest.o if it can be found in the search path. * config/i386/mingw32.h (ENDFILE_SPEC): Likewise. Index: gcc/config/i386/cygwin.h =================================================================== --- gcc/config/i386/cygwin.h (revision 209670) +++ gcc/config/i386/cygwin.h (working copy) @@ -45,6 +45,7 @@ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s}\ + %{!shared:%:if-exists(default-manifest.o%s)}\ crtend.o%s" /* Normally, -lgcc is not needed since everything in it is in the DLL, but we Index: gcc/config/i386/mingw32.h =================================================================== --- gcc/config/i386/mingw32.h (revision 209670) +++ gcc/config/i386/mingw32.h (working copy) @@ -148,6 +148,7 @@ #undef ENDFILE_SPEC #define ENDFILE_SPEC \ "%{Ofast|ffast-math|funsafe-math-optimizations:crtfastmath.o%s} \ + %{!shared:%:if-exists(default-manifest.o%s)}\ crtend.o%s" /* Override startfile prefix defaults. */