Makefile race betwwen jobs

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

 



Hello

I encountered a race between targets scripts_basic and asm-generic (due -j2 make flag).

It happens when source tree is distcleaned (mrproper).

First job:
	running target asm-generic to generate all wrappers in architecure include/generated.
Second job:
	trying to compile empty.c since it is under target "always" which is dependency for __build.

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

This race is rare and can be very annoying.

My naive patch for root 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

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