Race betwwen make jobs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Once in a while make fails when source tree is distcleaned (mrproper).
Actually it is while trying to compile scripts/mod/empty.c.

The error is because empty.o depends on some headers from arch/<arch>/include/generated/asm/.

>From my analysis I see that there is a race between two targets one is scripts_basic and the other is asm-generic (both in main Makefile).

First target in make job:
	running target asm-generic to generate all wrappers in architecure include/generated.

Second target in make job:
	trying to compile scripts/mod/empty.c since it is under target "always" which is dependency for __build (see scripts/Makefile.build).


My naive patch for main Makefile is:
 # Basic helpers built in scripts/
 PHONY += scripts_basic
-scripts_basic:
+scripts_basic: asm-generic
        $(Q)$(MAKE) $(build)=scripts/basic
        $(Q)rm -f .tmp_quiet_recordmcount


Please comment.

Noam Camus
--
To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux&nblp;USB Development]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite Secrets]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux