From: Olaf Hering Date: Wed, 13 Jul 2005 08:11:41 +0000 (-0700) Subject: [PATCH] ppc32: make -j12 all fails in uImage target X-Git-Tag: v2.6.13-rc4~121 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f13487c66c75f5db004a0631047309d9e7c5aab7;p=linux-2.6 [PATCH] ppc32: make -j12 all fails in uImage target make -j zImage may call if_changed twice at the same time, the result is a corrupted vmlinux.gz Write to a temporary file for the time being until someone with make skills fix the serialization properly. Signed-off-by: Olaf Hering Cc: Benjamin Herrenschmidt Cc: Sam Ravnborg Acked-by: Tom Rini Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/ppc/boot/images/Makefile b/arch/ppc/boot/images/Makefile index c9ac5f5fa9..532e7ef1ed 100644 --- a/arch/ppc/boot/images/Makefile +++ b/arch/ppc/boot/images/Makefile @@ -6,12 +6,17 @@ MKIMAGE := $(srctree)/scripts/mkuboot.sh extra-y := vmlinux.bin vmlinux.gz +# two make processes may write to vmlinux.gz at the same time with make -j +quiet_cmd_mygzip = GZIP $@ +cmd_mygzip = gzip -f -9 < $< > $@.$$$$ && mv $@.$$$$ $@ + + OBJCOPYFLAGS_vmlinux.bin := -O binary $(obj)/vmlinux.bin: vmlinux FORCE $(call if_changed,objcopy) $(obj)/vmlinux.gz: $(obj)/vmlinux.bin FORCE - $(call if_changed,gzip) + $(call if_changed,mygzip) quiet_cmd_uimage = UIMAGE $@ cmd_uimage = $(CONFIG_SHELL) $(MKIMAGE) -A ppc -O linux -T kernel \