Re: I disabled more compiler warnings..

From: Linus Torvalds
Date: Mon May 11 2020 - 13:41:29 EST


On Mon, May 11, 2020 at 12:43 AM David Laight <David.Laight@xxxxxxxxxx> wrote:
>
> I've not looked inside gmake, but I fixed nmake so that it
> properly used a single job token pipe for the entire (NetBSD)
> build and then flushed and refilled it with 'abort' tokens
> when any command failed.
> That made the build stop almost immediately.

The GNU jobserver doesn't have anything like that, afaik.

I think it always writes a '+' character as a token, so I guess it
could be extended to write something else for the "abort now"
situation (presumably a '-' character).

But at least for external jobserver clients (of which I am not aware
of any, I think we only depend on the internal GNU make behavior), the
documentation states that you should just write back the same token
you read.

I've looked at the low-level jobserver code because I was chasing a
bug there not that long ago, but I've never looked at the interaction
with actually running commands.

Adding Paul Smith to the cc to see if he has any comments..

Paul - the issue is that most of us build the kernel with a "make
-j<bignum>" (in my case "-j32") and if an error happens during the
make, it can take a _looong_ time for make to react. And if there are
warnings in the build, they can hide the actual error fairly easily).

So what David is talking about is to make fatal errors abort much more
quickly by having "jobserver_acquire()" perhaps return an error, and
aborting any jobs when they see that.

I can trivially see how to do it in the jobserver code itself (just
see if the token we get was '-', and if it was, write it back for the
next user and return error), but it's the downstream make code I'm
entirely unfamiliar with.

Any ideas?

Linus