Current-Users archive

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

Re: [ANALYSED] kernel object compilation failure unnoticed ?

On Mar 7,  1:02am, (David Holland) wrote:
-- Subject: Re: [ANALYSED] kernel object compilation failure unnoticed ?

| On Sat, Mar 06, 2010 at 09:40:47PM +0000, Christos Zoulas wrote:
|  >> The real complication is that in make -j mode, our make doesn't do
|  >> that but instead feeds stuff in blobs to the shell's stdin, so the
|  >> effects of operations like cd persist longer than one expects.
|  >> 
|  >> This behavior is definitely questionable...
|  > 
|  > That is why we have .SINGLESHELL or -B. We've lived with this behavior
|  > for many years, and I don't see a particular good reason to change it
|  > as there are many workarounds. I think we should just document better
|  > that by default our make tries to pass all commands in a target to
|  > a single shell.
| Well... I think either we should embrace it and make it the default,
| or enable it based on something other than using -j, as it has nothing
| to do with parallel builds.

I thought -B was not the default for non-parallel makes;
perhaps that was changed?

| The original logic was that if you were using make -j you must have
| written a makefile for pmake, but that was never particularly sound
| reasoning and came unstuck completely when gmake got -j support ages
| ago.

Yes, and the reasoning for batching the commands was that forking/execing
sh was expensive. So there is a *lot* of logic there to make sure that
the command does not run "cd" for example or has any special characters
before make decides to merge it with others in the same target. Also
remember that pmake was using "customs" to execute commands on remote
systems, so it was trying to save round trips (and make sure that targets
work properly since building a single target that creates intermediate
files over NFS can be ahem, problematic...)

| What I don't see is what it does so that a single failing line will
| cause the whole command to fail. It passes the whole block to the
| shell and as far as I can tell with ktrace is not setting -e, but it
| works...

Look in the shells[] array in job.c.


Home | Main Index | Thread Index | Old Index