* [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O=...
@ 2006-01-15 21:26 Sam Ravnborg
2006-01-16 2:09 ` Kalin KOZHUHAROV
0 siblings, 1 reply; 5+ messages in thread
From: Sam Ravnborg @ 2006-01-15 21:26 UTC (permalink / raw)
To: linux-kernel
[It is pushed out at:
git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git]
The way multiple targets was handled with make O=...
broke because for each high-level target make spawned
a parallel make resulting in a broken build.
Reported by Keith Owens <kaos@ocs.com.au>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
---
Makefile | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
296e0855b0f9a4ec9be17106ac541745a55b2ce1
diff --git a/Makefile b/Makefile
index deedaf7..b3dd9db 100644
--- a/Makefile
+++ b/Makefile
@@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUT
$(if $(KBUILD_OUTPUT),, \
$(error output directory "$(saved-output)" does not exist))
-.PHONY: $(MAKECMDGOALS)
+.PHONY: $(MAKECMDGOALS) cdbuilddir
+$(MAKECMDGOALS) _all: cdbuilddir
-$(filter-out _all,$(MAKECMDGOALS)) _all:
+cdbuilddir:
$(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
KBUILD_SRC=$(CURDIR) \
- KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
+ KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS)
# Leave processing to above invocation of make
skip-makefile := 1
--
1.0.GIT
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O=...
2006-01-15 21:26 [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O= Sam Ravnborg
@ 2006-01-16 2:09 ` Kalin KOZHUHAROV
2006-01-16 2:24 ` Keith Owens
0 siblings, 1 reply; 5+ messages in thread
From: Kalin KOZHUHAROV @ 2006-01-16 2:09 UTC (permalink / raw)
To: linux-kernel
Sam Ravnborg wrote:
> [It is pushed out at:
> git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git]
>
> The way multiple targets was handled with make O=...
> broke because for each high-level target make spawned
> a parallel make resulting in a broken build.
> Reported by Keith Owens <kaos@ocs.com.au>
When did it break? Are any of the released (not -git) kernels affected?
> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
>
> ---
>
> Makefile | 7 ++++---
> 1 files changed, 4 insertions(+), 3 deletions(-)
>
> 296e0855b0f9a4ec9be17106ac541745a55b2ce1
> diff --git a/Makefile b/Makefile
> index deedaf7..b3dd9db 100644
> --- a/Makefile
> +++ b/Makefile
> @@ -106,12 +106,13 @@ KBUILD_OUTPUT := $(shell cd $(KBUILD_OUT
> $(if $(KBUILD_OUTPUT),, \
> $(error output directory "$(saved-output)" does not exist))
>
> -.PHONY: $(MAKECMDGOALS)
> +.PHONY: $(MAKECMDGOALS) cdbuilddir
> +$(MAKECMDGOALS) _all: cdbuilddir
>
> -$(filter-out _all,$(MAKECMDGOALS)) _all:
> +cdbuilddir:
> $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \
> KBUILD_SRC=$(CURDIR) \
> - KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $@
> + KBUILD_EXTMOD="$(KBUILD_EXTMOD)" -f $(CURDIR)/Makefile $(MAKECMDGOALS)
>
> # Leave processing to above invocation of make
> skip-makefile := 1
Kalin.
--
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O=...
2006-01-16 2:09 ` Kalin KOZHUHAROV
@ 2006-01-16 2:24 ` Keith Owens
2006-01-16 2:42 ` Kalin KOZHUHAROV
0 siblings, 1 reply; 5+ messages in thread
From: Keith Owens @ 2006-01-16 2:24 UTC (permalink / raw)
To: Kalin KOZHUHAROV; +Cc: linux-kernel
Kalin KOZHUHAROV (on Mon, 16 Jan 2006 11:09:51 +0900) wrote:
>Sam Ravnborg wrote:
>> [It is pushed out at:
>> git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git]
>>
>> The way multiple targets was handled with make O=...
>> broke because for each high-level target make spawned
>> a parallel make resulting in a broken build.
>> Reported by Keith Owens <kaos@ocs.com.au>
>
>When did it break? Are any of the released (not -git) kernels affected?
2.6.15 has the problem. It only triggers with the combination of a
separate object directory _and_ multiple targets on the make command
line _and_ running make in parallel (make -j).
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O=...
2006-01-16 2:24 ` Keith Owens
@ 2006-01-16 2:42 ` Kalin KOZHUHAROV
2006-01-16 2:50 ` Sam Ravnborg
0 siblings, 1 reply; 5+ messages in thread
From: Kalin KOZHUHAROV @ 2006-01-16 2:42 UTC (permalink / raw)
To: linux-kernel
Keith Owens wrote:
> Kalin KOZHUHAROV (on Mon, 16 Jan 2006 11:09:51 +0900) wrote:
>> Sam Ravnborg wrote:
>>> [It is pushed out at:
>>> git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild.git]
>>>
>>> The way multiple targets was handled with make O=...
>>> broke because for each high-level target make spawned
>>> a parallel make resulting in a broken build.
>>> Reported by Keith Owens <kaos@ocs.com.au>
>> When did it break? Are any of the released (not -git) kernels affected?
>
> 2.6.15 has the problem. It only triggers with the combination of a
> separate object directory _and_ multiple targets on the make command
> line _and_ running make in parallel (make -j).
Thanks for the clarification!
I am safe as I don't usually use multiple targets, but I always compile with
KBUILD_OUTPUT set and make -j5 (and distcc).
However, some of the out-of-tree modules might break, will stay on alert.
A quick check through the relevant to my hardware ebuilds (/me on Gentoo)
showed no show stoppers, they all do:
for T in $TARGETS; do make $T; done
(MAKEOPTS=-jN is handled internally on Gentoo if configured; and I use
/var/kernels/out to compile my kernels)
Please get that patch into 2.6.15.2 if possible (seems many people have ppp
problems, so I guess that will be released soon).
Kalin.
--
|[ ~~~~~~~~~~~~~~~~~~~~~~ ]|
+-> http://ThinRope.net/ <-+
|[ ______________________ ]|
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O=...
2006-01-16 2:42 ` Kalin KOZHUHAROV
@ 2006-01-16 2:50 ` Sam Ravnborg
0 siblings, 0 replies; 5+ messages in thread
From: Sam Ravnborg @ 2006-01-16 2:50 UTC (permalink / raw)
To: Kalin KOZHUHAROV; +Cc: linux-kernel
On Mon, Jan 16, 2006 at 11:42:30AM +0900, Kalin KOZHUHAROV wrote:
>> When did it break? Are any of the released (not -git) kernels affected?
> >
> > 2.6.15 has the problem. It only triggers with the combination of a
> > separate object directory _and_ multiple targets on the make command
> > line _and_ running make in parallel (make -j).
I have not tested, but I beleive the bug has been present since day one
of the make O=... feature inclusion.
> Please get that patch into 2.6.15.2 if possible (seems many people have ppp
> problems, so I guess that will be released soon).
Since it has been present for long then we are not in a big hurry.
One report in many months.
Sam
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-01-16 2:50 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-01-15 21:26 [PATCH 2/2] kbuild: fix make -jN with multiple targets with make O= Sam Ravnborg
2006-01-16 2:09 ` Kalin KOZHUHAROV
2006-01-16 2:24 ` Keith Owens
2006-01-16 2:42 ` Kalin KOZHUHAROV
2006-01-16 2:50 ` Sam Ravnborg
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).