arm: fix parallel build (make -j)
Dependency on asm-offsets.h wasn't made explicit in the Makefiles. Worked without -j because non-parallel make builds dependencies in declared order.
--- arm/Makefile.common | 2 ++ 1 file changed, 2 insertions(+)
arm/Makefile.common +2 -0
@@ -71,3 +71,5 @@ test_cases: $(generated_files) $(tests-common) $(tests) $(TEST_DIR)/selftest.elf: $(cstart.o) $(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.elf: $(cstart.o) $(TEST_DIR)/spinlock-test.o + +$(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.o $(cstart.o): $(asm-offsets)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
Quoted 14 lines · Peter Feiner
Dependency on
asm-offsets.hwasn't made explicit in the Makefiles. Worked without -j because non-parallel make builds dependencies in declared order.Signed-off-by Peter Feiner <[email protected]>--- arm/Makefile.common | 2 ++ 1 file changed, 2 insertions(+)arm/Makefile.common +0
-0
arm/Makefile.common test_cases: $(generated_files) $(tests-common) $(tests) · line 75
Quoted 5 lines
arm/Makefile.common +2
-0@@ -71,3 +71,5 @@ test_cases: $(generated_files) $(tests-common) $(tests) $(TEST_DIR)/selftest.elf: $(cstart.o) $(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.elf: $(cstart.o) $(TEST_DIR)/spinlock-test.o + +$(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.o $(cstart.o): $(asm-offsets)
You know a project is really growing when you need 'make -j' :-)
How about this patch instead though
-test_cases: $(generated_files) $(tests-common) $(tests) +test_cases: $(tests-common) $(tests)
+$(patsubst %.flat,%.o,$(tests-common) $(tests)) $(cstart.o): $(generated_files)
Or, hmm, actually any $(TEST_DIR)/ lib/$(TEST_DIR)/ or lib/$(ARCH)/ source file could depend on asm-offsets. So the above probably isn't sufficient for the long term either.
Thanks,
drew
Quoted 7 lines
Signature · 6 lines
2.7.0.rc3.207.g0ac5344 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Paolo Bonzini
maintainerQuoted 10 lines · Andrew Jones
Quoted 2 lines
Quoted 2 lines
+
+$(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.o $(cstart.o): $(asm-offsets)You know a project is really growing when you need 'make -j' :-)
How about this patch instead though
(quoted diff) +2
-1-test_cases: $(generated_files) $(tests-common) $(tests) +test_cases: $(tests-common) $(tests) +$(patsubst %.flat,%.o,$(tests-common) $(tests)) $(cstart.o): $(generated_files)
Quoted 3 lines
Or, hmm, actually any $(TEST_DIR)/ lib/$(TEST_DIR)/ or lib/$(ARCH)/ source file could depend on asm-offsets. So the above probably isn't sufficient for the long term either.
I expect a relatively small part of the .o files to need asm-offsets, so I'm going with Peter's patch.
Paolo
Quoted 13 lines · Paolo Bonzini
Quoted 10 lines · Andrew Jones
Quoted 2 lines
Quoted 2 lines
+
+$(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.o $(cstart.o): $(asm-offsets)You know a project is really growing when you need 'make -j' :-)
How about this patch instead though
(quoted diff) +2
-1-test_cases: $(generated_files) $(tests-common) $(tests) +test_cases: $(tests-common) $(tests) +$(patsubst %.flat,%.o,$(tests-common) $(tests)) $(cstart.o): $(generated_files)
Quoted 6 lines
Quoted 3 lines
Or, hmm, actually any $(TEST_DIR)/ lib/$(TEST_DIR)/ or lib/$(ARCH)/ source file could depend on asm-offsets. So the above probably isn't sufficient for the long term either.
I expect a relatively small part of the .o files to need asm-offsets, so I'm going with Peter's patch.
Well, his patch adds the dependency for $(TEST_DIR)/spinlock-test.o, which actually doesn't need it. We should either just put the ones that need it, or all of them.
Thanks,
drew
Quoted 21 lines · Andrew Jones
Quoted 13 lines · Paolo Bonzini
Quoted 10 lines · Andrew Jones
Quoted 2 lines
Quoted 2 lines
+
+$(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.o $(cstart.o): $(asm-offsets)You know a project is really growing when you need 'make -j' :-)
How about this patch instead though
(quoted diff) +2
-1-test_cases: $(generated_files) $(tests-common) $(tests) +test_cases: $(tests-common) $(tests) +$(patsubst %.flat,%.o,$(tests-common) $(tests)) $(cstart.o): $(generated_files)Quoted 6 lines
Quoted 3 lines
Or, hmm, actually any $(TEST_DIR)/ lib/$(TEST_DIR)/ or lib/$(ARCH)/ source file could depend on asm-offsets. So the above probably isn't sufficient for the long term either.
I expect a relatively small part of the .o files to need asm-offsets, so I'm going with Peter's patch.
Quoted 3 lines
Well, his patch adds the dependency for $(TEST_DIR)/spinlock-test.o, which actually doesn't need it. We should either just put the ones that need it, or all of them.
My mistake! Evidently I can't read the output of grep properly. I'll send v2 with the minimal list of dependencies.
PATCH v2 1/1 arm: fix parallel build (make -j)
In reply to Peter FeinerDependency on asm-offsets.h wasn't made explicit in the Makefiles. Worked without -j because non-parallel make builds dependencies in declared order.
---
v2:
* Removed unnecessary dependency from spinlock-test.o
arm/Makefile.common | 2 ++ 1 file changed, 2 insertions(+)
arm/Makefile.common +2 -0
@@ -71,3 +71,5 @@ test_cases: $(generated_files) $(tests-common) $(tests) $(TEST_DIR)/selftest.elf: $(cstart.o) $(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.elf: $(cstart.o) $(TEST_DIR)/spinlock-test.o + +$(TEST_DIR)/selftest.o $(cstart.o): $(asm-offsets)
Signature · 1 line
2.7.0.rc3.207.g0ac5344
Quoted 5 lines · Peter Feiner
Dependency on
asm-offsets.hwasn't made explicit in the Makefiles. Worked without -j because non-parallel make builds dependencies in declared order.Signed-off-by Peter Feiner <[email protected]>
Quoted 26 lines
---
v2:
* Removed unnecessary dependency from spinlock-test.oarm/Makefile.common | 2 ++ 1 file changed, 2 insertions(+)arm/Makefile.common +2
-0@@ -71,3 +71,5 @@ test_cases: $(generated_files) $(tests-common) $(tests) $(TEST_DIR)/selftest.elf: $(cstart.o) $(TEST_DIR)/selftest.o $(TEST_DIR)/spinlock-test.elf: $(cstart.o) $(TEST_DIR)/spinlock-test.o + +$(TEST_DIR)/selftest.o $(cstart.o): $(asm-offsets)Signature · 6 lines
2.7.0.rc3.207.g0ac5344 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html