collect2 patch for i386-cygwin32

Jeffrey A Law
Wed Apr 8 23:33:00 GMT 1998

  In message <>you write:
  > Since the collect2 is enabled for cygwin32 in the release branch, this 
  > patch is now crucial.
  > The patch to collect_execute is due a bug in cygwin32 freopen routine
  > where the stderr goes to the bit bucket, and the ld error messages never
  > show up go missing; so use dup2. I've left the original ifdef'd so that we
  > can remove the change when freopen is fixed in cygwin32.
  > The one to find_a_file avoids an infinite loop during bootstrap
  > where ld keeps on exec'ing itself ad infinitum. This is a gross hack, but
  > no worse than the existing one.
  > Very low risk. Should apply cleanly to both release and mainline tree.
  > Wed Dec 31 11:14:32 1997  Mumit Khan <>
  > 	* collect2.c (DIR_SEPARATOR): Define.
  > 	(find_a_file): Handle MS-DOS type filenames.
  > 	(collect_execute): Workaround for Gnu-Win32 b18 bug
  > 	when redirecting child stdout and stderr using freopen.
I think the find_a_file change is no longer needed now that
collect2 is actually called collect2 instead of ld.

I don't know the state of the other changes, which (if any) do
we still need for the mainline sources?


More information about the Gcc-bugs mailing list