Hello,
when I run (serial) make, it first compiles the objects files for the
first library, then links the fist library, then it compiles the object
files for the second library, then links the second library. Finally,
for each executable, it compiles the object files and links.
When I run parallel make -j 4, it first compiles all object files (for
the libraries and for the executables), then it links all libraries and
then it links the executables.
I have the feeling that the second algorithm has a bottleneck:
While compiling object files is always possible, linking of programmes
can start, after the dependent libraries are linked. So in the moment,
when all object files are build, and the single library, on which all
executables depend, is being linked, parallel make executes only one
job: linking the library.
I have not measured this with frozen processes, but when I check the
output of make, and the logic behind, i guess the above scenario can happen.
Can you confirm it?
If yes, I propose also in parallel builds to keep the same logic, as
with serial builds, with the addition to compile object files, just in
case no requirements are currently satisfied, to start linkage. Or with
other words, first try to build the final leaves (bin, lib, info) and in
case this cannot be started now for a library, build the first level
(object files) for the next final target(library) as temporary measure,
until the requirements for the linkage are satisfied.
Anyway, I am sure that if see the problem exist, you can also find a
nice solution for it.
Greetings
Dilian
_______________________________________________
Bug-make mailing list
Bug-make@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-make