x86: fix build race when generating temporary object files
authorJan Beulich <jbeulich@suse.com>
Wed, 15 May 2019 07:49:35 +0000 (09:49 +0200)
committerJan Beulich <jbeulich@suse.com>
Wed, 15 May 2019 07:49:35 +0000 (09:49 +0200)
commit0ab95a98fea75535d11dc5f06290d923feb27dd1
tree5f7e51f1c13f002aceddbd6dc7cc1f5d15d541d8
parentd85748bd106cad62d7594ce823118df9ecc19807
x86: fix build race when generating temporary object files

The rules to generate xen-syms and xen.efi may run in parallel, but both
recursively invoke $(MAKE) to build symbol/relocation table temporary
object files. These recursive builds would both re-generate the .*.d2
files (where needed). Both would in turn invoke the same rule, thus
allowing for a race on the .*.d2.tmp intermediate files.

The dependency files of the temporary .xen*.o files live in xen/ rather
than xen/arch/x86/ anyway, so won't be included no matter what. Take the
opportunity and delete them, as the just re-generated .xen*.S files will
trigger a proper re-build of the .xen*.o ones anyway.

Empty the DEPS variable in case the set of goals consists of just those
temporary object files, thus eliminating the race.

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Andrew Cooper <andrew.cooper3@citrix.com>
master commit: 761bb575ce97255029d2d2249b2719e54bc76825
master date: 2019-04-11 10:25:05 +0200
xen/arch/x86/Makefile