Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

xtensa: fix parallel make

Make vmlinux.tmp and vmlinux.tmp.gz separate build targets, avoid
removing vmlinux.tmp during vmlinux.tmp.gz build.

Signed-off-by: Max Filippov <jcmvbkbc@gmail.com>
Signed-off-by: Chris Zankel <chris@zankel.net>

authored by

Max Filippov and committed by
Chris Zankel
7c94fe4a d0fccc04

+12 -9
+5 -4
arch/xtensa/boot/boot-elf/Makefile
··· 20 20 21 21 OBJS := $(addprefix $(obj)/,$(boot-y)) 22 22 23 - Image: vmlinux $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds 23 + vmlinux.tmp: vmlinux 24 24 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 25 - vmlinux vmlinux.tmp 25 + $^ $@ 26 + 27 + Image: vmlinux.tmp $(OBJS) arch/$(ARCH)/boot/boot-elf/boot.lds 26 28 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 27 29 --add-section image=vmlinux.tmp \ 28 30 --set-section-flags image=contents,alloc,load,load,data \ ··· 32 30 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 33 31 -T arch/$(ARCH)/boot/boot-elf/boot.lds \ 34 32 -o arch/$(ARCH)/boot/$@.elf $@.tmp 35 - rm -f $@.tmp vmlinux.tmp 36 33 37 34 Image.initrd: vmlinux $(OBJS) 38 35 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ ··· 45 44 $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) \ 46 45 -T $(srctree)/arch/$(ARCH)/boot/boot-elf/boot.ld \ 47 46 -o arch/$(ARCH)/boot/$@.elf $@.tmp 48 - rm -f $@.tmp vmlinux.tmp 47 + #rm -f $@.tmp vmlinux.tmp 49 48 50 49 51 50 zImage: Image
+7 -5
arch/xtensa/boot/boot-redboot/Makefile
··· 21 21 22 22 LIBGCC := $(shell $(CC) $(KBUILD_CFLAGS) -print-libgcc-file-name) 23 23 24 - zImage: vmlinux $(OBJS) $(LIBS) 24 + vmlinux.tmp: vmlinux 25 25 $(OBJCOPY) --strip-all -R .comment -R .note.gnu.build-id -O binary \ 26 - vmlinux vmlinux.tmp 27 - gzip -vf9 vmlinux.tmp 26 + $^ $@ 27 + 28 + vmlinux.tmp.gz: vmlinux.tmp 29 + $(GZIP) $(GZIP_FLAGS) $^ > $@ 30 + 31 + zImage: vmlinux.tmp.gz $(OBJS) $(LIBS) 28 32 $(OBJCOPY) $(OBJCOPY_ARGS) -R .comment \ 29 33 --add-section image=vmlinux.tmp.gz \ 30 34 --set-section-flags image=contents,alloc,load,load,data \ 31 35 $(OBJS) $@.tmp 32 36 $(LD) $(LD_ARGS) -o $@.elf $@.tmp $(LIBS) -L/xtensa-elf/lib $(LIBGCC) 33 37 $(OBJCOPY) -S -O binary $@.elf arch/$(ARCH)/boot/$@.redboot 34 - rm -f $@.tmp $@.elf vmlinux.tmp.gz 35 -