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

powerpc: Avoid circular dependency with zImage.%

The rule to create the final images uses a zImage.% pattern.
Unfortunately, this also matches the names of the zImage.*.lds linker
scripts, which appear as a dependency of the final images. This somehow
worked when $(srctree) used to be an absolute path, but now the pattern
matches too much. List only the images from $(image-y) as the target of
the rule, to avoid the circular dependency.

Reported-and-tested-by: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Signed-off-by: Michal Marek <mmarek@suse.cz>

+2 -2
+2 -2
arch/powerpc/boot/Makefile
··· 315 315 $(obj)/zImage.initrd.%: vmlinux $(wrapperbits) 316 316 $(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz) 317 317 318 - $(obj)/zImage.%: vmlinux $(wrapperbits) 319 - $(call if_changed,wrap,$*) 318 + $(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits) 319 + $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@)) 320 320 321 321 # dtbImage% - a dtbImage is a zImage with an embedded device tree blob 322 322 $(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb