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: [PATCH] Fix file descriptor existence of MinGW.


On 8/7/19 4:35 PM, Ian Lance Taylor wrote:
> On Wed, Aug 7, 2019 at 5:09 AM Martin Liška <mliska@suse.cz> wrote:
>>
>> There's one enhanced version where I added HAVE_FCNTL_H.
>>
>> Patch can bootstrap on x86_64-linux-gnu and survives regression tests.
>>
>> Ready to be installed?
> 
> I think a better name than fd_exists would be is_valid_fd.  If that's
> OK with you, the libiberty part of this patch seems fine with that
> change.  Thanks.

Thank you, I installed the patch with changed name.

> 
> (Although I'm not quite sure what problem this is trying to solve.
> What goes wrong if the driver just doesn't bother to check whether the
> file descriptors listed in --jobserver-auth are valid?

Because make provides a silly jobserver API. When you forget to add '+'
to your make target, then make will pass --jobserver-auth=x,y options,
but the file descriptors are not opened. And so that one can't use job
server. That's why we do the dance.

Martin

>  Why would that
> ever happen, and why would it matter if it did?  The ChangeLog talks
> about the linker using the same file descriptors, but in that case
> won't this test see the descriptors as valid?)
> 
> Ian
> 


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