2.6.14-rc1 ia64 rebuilds everything every time
Because of the recursive definition in ia64 asm-offset.c, where the file has to exist with a dummy line before it can be generated, we end up with this recursive dependency.
arch/ia64/kernel/asm-offsets.s -> include/asm/asm-offsets.h (.cmd file) include/asm/asm-offsets.h -> arch/ia64/kernel/asm-offsets.s (explicit)
Every 2.6.14-rc1 build rebuilds asm-offsets.s, because it asm-offsets.h is newer. Which then rebuilds asm-offsets.h, which in turn rebuilds everything else.
Best solution: remove (and forbid) recursive definitions in asm-offset.c.
Kludge 1: edit arch/$(ARCH)/kernel/.asm-offsets.s.cmd to remove include/asm/asm-offsets.h.
Kludge 2: Build arch/$(ARCH)/kernel/asm-offsets.s as a temporary file then check if it has changed or not, only updating the real arch/$(ARCH)/kernel/asm-offsets.s if there is any change.
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Keith" = Keith Owens <[email protected]> writes:
Keith> Best solution: remove (and forbid) recursive definitions in Keith> asm-offset.c.
Unfortunately,I'm not sure that's possible.
Keith> Kludge 2: Build arch/$(ARCH)/kernel/asm-offsets.s as a Keith> temporary file then check if it has changed or not, only Keith> updating the real arch/$(ARCH)/kernel/asm-offsets.s if there is Keith> any change.
This is what used to happen.
Peter C
Quoted 9 lines · Peter Chubb
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Keith" = Keith Owens <[email protected]> writes:
Keith> Best solution: remove (and forbid) recursive definitions in Keith>
asm-offset.c.Unfortunately,I'm not sure that's possible.
Quoted 6 lines
Keith> Kludge 2: Build arch/$(ARCH)/kernel/asm-offsets.s as a Keith> temporary file then check if it has changed or not, only Keith> updating the real arch/$(ARCH)/kernel/asm-offsets.s if there is Keith> any change.
This is what used to happen.
What actually used to happen was that asm-offsets.h seldom was rebuild despite included file had changed in the meantime.
When it then got rebuild - then we did the "has file changed" trick.
That I can be convinced to add back. On the other hand this is no more special than any other fundamental .h file - when it changes we recompile was uses it.
The reason why it hit us hard with ia64 is that is gets rebuild due to the circular dependency where the file used to build asm-offsets.h uses asm-offsets.h.
If we solve that problem the 'recompile everything' issue disappear.
Tony already posted an ugly patch to solve most of this. I agree fully with Tony this is an ugly patch - did I have better ideas how to solve it I would have posted a patch.
Sam