Fix a parallel build failure.
PATCH 1/1 Fix a parallel build failure.
From: Daniel Jacobowitz <[email protected]>
With enough parallelism, make will run all the dependencies of build-all at the same time:
build-all: config-host.h config-all-devices.h $(DOCS) $(TOOLS)
So some of the $(TOOLS) will build before config-host.h is finished. The object files need to depend on it explicitly. Subdirectories are OK since they are started from the body of build-all, not its dependencies.
--- Makefile | 2 ++ rules.mak | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-)
Makefile +2 -0
@@ -1,5 +1,7 @@ # Makefile for QEMU. +GENERATED_HEADERS = config-host.h config-all-devices.h + ifneq ($(wildcard config-host.mak),) # Put the all: rule here so that config-host.mak can contain dependencies. all: build-all
rules.mak +1 -1
@@ -13,7 +13,7 @@ MAKEFLAGS += -rR QEMU_CFLAGS += -MMD -MP -MT $@ -%.o: %.c +%.o: %.c $(GENERATED_HEADERS) $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") %.o: %.S
Signature · 1 line
1.6.5.2
Quoted 36 lines · Daniel Jacobowitz
From: Daniel Jacobowitz <[email protected]>
With enough parallelism, make will run all the dependencies of build-all at the same time:
build-all:
config-host.hconfig-all-devices.h$(DOCS) $(TOOLS)So some of the $(TOOLS) will build before
config-host.his finished. The object files need to depend on it explicitly. Subdirectories are OK since they are started from the body of build-all, not its dependencies.Signed-off-by Daniel Jacobowitz <[email protected]>--- Makefile | 2 ++ rules.mak | 2 +- 2 files changed, 3 insertions(+), 1 deletions(-)Makefile +2
-0@@ -1,5 +1,7 @@ # Makefile for QEMU. +GENERATED_HEADERS = config-host.h config-all-devices.h + ifneq ($(wildcard config-host.mak),) # Put the all: rule here so that config-host.mak can contain dependencies. all: build-allrules.mak +0
-0
rules.mak MAKEFLAGS += -rR · line 19
Quoted 8 lines
rules.mak +1
-1@@ -13,7 +13,7 @@ MAKEFLAGS += -rR QEMU_CFLAGS += -MMD -MP -MT $@ -%.o: %.c +%.o: %.c $(GENERATED_HEADERS) $(call quiet-command,$(CC) $(QEMU_CFLAGS) $(CFLAGS) -c -o $@ $<," CC $(TARGET_DIR)$@") %.o: %.S
Maybe a mix of your patch and my patch
(http://patchwork.ozlabs.org/patch/37446/)
would be the best fix for this problem.
It should also be possible to apply both patches.
Regards
Stefan
Quoted 5 lines · Stefan Weil
Maybe a mix of your patch and my patch
(http://patchwork.ozlabs.org/patch/37446/)
would be the best fix for this problem.It should also be possible to apply both patches.
Thanks, I didn't find your patch. I don't have any preference which is applied, although I'm always in favor of eliminating unnecessary recursive invocations.
Signature · 2 lines
Daniel Jacobowitz CodeSourcery