[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Regression caused by Commit: 5bd7ad2b225b ("Preserve the real value

From: Eric Melski
Subject: Re: Regression caused by Commit: 5bd7ad2b225b ("Preserve the real value of -jN in MAKEFLAGS using jobserver.")
Date: Tue, 31 Oct 2017 14:42:06 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0

On 10/30/2017 02:22 PM, Paul Smith wrote:
On Tue, 2017-10-31 at 07:39 +1100, NeilBrown wrote:
On Mon, Oct 30 2017, Tim Murphy wrote:

For my money -j is always a top-level setting.   To have it per makefile
and then let makefiles depend on that behaviour would open the door to lots
of scary bugs.

I don't see what scary bugs we might have; I've seen issues where
makefiles not intended to be used with -j will not work properly with
-j, but I'm not sure I've ever seen an issue with a makefile intended
to work with -j that fails when run without it, or with a different

Here's a trivial example that shows how a build could fail if -j is not specified, but work if -j is specified (with any value, in this case), assuming "output" does not exist to start:

        all: reader writer
                sleep 2
                cat output
                echo PASS > output

Of course "work" is used somewhat loosely here, as the build might appear to work but in fact pick up stale data if "output" happens to exist prior to the start of the run (eg, in an incremental build).

It's not a common scenario, to be sure, but I have encountered this "in the wild". Just last week I worked with a large commercial build which exhibited this behavior, due to a missing dependency between the reader and writer jobs.


Eric Melski
Chief Architect
Electric Cloud, Inc.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]