1 From: Jo-Philipp Wich <jo@mein.io>
2 Date: Wed, 4 Jan 2017 10:35:00 +0100
3 Subject: [PATCH] powerpc: boot: fix build with parallel make
5 The powerpc boot wrapper Makefile is not parallel build safe, causing fixdep
6 to fail reading dependency files of the addnote, hack-coff and mktree
7 utilities when concurrently building different image targets.
9 A typical failure looks like:
11 Building modules, stage 2.
12 HOSTCC arch/powerpc/boot/addnote
13 HOSTCC arch/powerpc/boot/hack-coff
14 DTC arch/powerpc/boot/taishan.dtb
15 HOSTCC arch/powerpc/boot/addnote
16 HOSTCC arch/powerpc/boot/hack-coff
18 fixdep: error opening depfile: arch/powerpc/boot/.hack-coff.d: No such file or directory
19 scripts/Makefile.host:91: recipe for target 'arch/powerpc/boot/hack-coff' failed
20 make[5]: *** [arch/powerpc/boot/hack-coff] Error 2
21 make[5]: *** Waiting for unfinished jobs....
22 fixdep: error opening depfile: arch/powerpc/boot/.addnote.d: No such file or directory
23 scripts/Makefile.host:91: recipe for target 'arch/powerpc/boot/addnote' failed
24 make[5]: *** [arch/powerpc/boot/addnote] Error 2
25 rm arch/powerpc/boot/taishan.dtb
26 arch/powerpc/Makefile:263: recipe for target 'cuImage.taishan' failed
27 make[4]: *** [cuImage.taishan] Error 2
28 make[4]: *** Waiting for unfinished jobs....
30 Add a GNU make specific .NOTPARALLEL pseudo rule to enforce sequential building
31 of the addnote, hack-coff and mktree executables.
33 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
35 --- a/arch/powerpc/boot/Makefile
36 +++ b/arch/powerpc/boot/Makefile
37 @@ -194,6 +194,8 @@ wrapper :=$(srctree)/$(src)/wrapper
38 wrapperbits := $(extra-y) $(addprefix $(obj)/,addnote hack-coff mktree) \
41 +.NOTPARALLEL: $(addprefix $(obj)/,addnote hack-coff mktree) $(wrapper)
44 # Bits for building various flavours of zImage