This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Make collect2 be buildable when host=i386-mingw,target=something else


> This looks like a nightmare to implement, particularly with respect
> to error handling.

Compared to the nightmare already in gcc.c and collect2.c?  ;-)

> Sure there is:

Right, but that's not a pipe, and can only be used in very limited
ways.  I'd rather have an API that doesn't pretend that there's a real
pipe behind pmkpipe().  I'd rather design the API such that anyone
using it *knows* that there may be files used.

> In conjunction with cleverness in pexec() and pwait() which boils down
> to 'if stdin of this process is being redirected, hold off on invoking
> it until pwait is called so that the parent gets a chance to write to
> the fake pipe'.  This works because there isn't any concurrency under
> DOS; the child will either write the entire file before the parent can
> read it, or read the entire file after the parent is done writing it.

This is what popen() does in djgpp.  But your API allows both input
and output handles to be pipe.  You can't do both without real pipes.

> Please note I am not volunteering to implement any solution for DJGPP;

Gee, thanks.  DJGPP is a popular platform, and you expect me to
approve a patch that will break it?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]