From: Michal Marek <mmarek@suse.cz>
To: Mike Qiu <qiudayu@linux.vnet.ibm.com>
Cc: Sam Ravnborg <sam@ravnborg.org>,
linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
linux-kbuild@vger.kernel.org
Subject: [PATCH v2] powerpc: Avoid circular dependency with zImage.%
Date: Wed, 11 Jun 2014 17:40:43 +0200 [thread overview]
Message-ID: <1402501243-28213-1-git-send-email-mmarek@suse.cz> (raw)
In-Reply-To: <53984D4F.6040808@linux.vnet.ibm.com>
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.
Signed-off-by: Michal Marek <mmarek@suse.cz>
---
v2:
- Filter out duplicates in the target list
- fix the platform argument to cmd_wrap
arch/powerpc/boot/Makefile | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/powerpc/boot/Makefile b/arch/powerpc/boot/Makefile
index 426dce7..ccc25ed 100644
--- a/arch/powerpc/boot/Makefile
+++ b/arch/powerpc/boot/Makefile
@@ -333,8 +333,8 @@ $(addprefix $(obj)/, $(initrd-y)): $(obj)/ramdisk.image.gz
$(obj)/zImage.initrd.%: vmlinux $(wrapperbits)
$(call if_changed,wrap,$*,,,$(obj)/ramdisk.image.gz)
-$(obj)/zImage.%: vmlinux $(wrapperbits)
- $(call if_changed,wrap,$*)
+$(addprefix $(obj)/, $(sort $(filter zImage.%, $(image-y)))): vmlinux $(wrapperbits)
+ $(call if_changed,wrap,$(subst $(obj)/zImage.,,$@))
# dtbImage% - a dtbImage is a zImage with an embedded device tree blob
$(obj)/dtbImage.initrd.%: vmlinux $(wrapperbits) $(obj)/%.dtb
--
1.9.2
next prev parent reply other threads:[~2014-06-11 15:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-11 6:02 Kernel build fail with "Circular xxxx <- xxxx dependency dropped" Mike Qiu
2014-06-11 8:24 ` Michal Marek
2014-06-11 12:21 ` Michal Marek
2014-06-11 12:22 ` Michal Marek
2014-06-11 12:36 ` Mike Qiu
2014-06-11 15:40 ` Michal Marek [this message]
2014-06-12 2:07 ` [PATCH v2] powerpc: Avoid circular dependency with zImage.% Mike Qiu
2014-06-12 8:09 ` Michal Marek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1402501243-28213-1-git-send-email-mmarek@suse.cz \
--to=mmarek@suse.cz \
--cc=linux-kbuild@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=qiudayu@linux.vnet.ibm.com \
--cc=sam@ravnborg.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).