From patchwork Tue Aug 3 06:47:48 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 60728 Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from bilbo.ozlabs.org (localhost [127.0.0.1]) by ozlabs.org (Postfix) with ESMTP id 2E6E4100A06 for ; Tue, 3 Aug 2010 16:48:01 +1000 (EST) Received: by ozlabs.org (Postfix) id A1243B6EF7; Tue, 3 Aug 2010 16:47:53 +1000 (EST) Delivered-To: linuxppc-dev@ozlabs.org Received: from pfepb.post.tele.dk (pfepb.post.tele.dk [195.41.46.236]) by ozlabs.org (Postfix) with ESMTP id 4D323B6EED for ; Tue, 3 Aug 2010 16:47:51 +1000 (EST) Received: from merkur.ravnborg.org (x1-6-00-1e-2a-84-ae-3e.k225.webspeed.dk [80.163.61.94]) by pfepb.post.tele.dk (Postfix) with ESMTP id 7423CF8402E; Tue, 3 Aug 2010 08:47:48 +0200 (CEST) Date: Tue, 3 Aug 2010 08:47:48 +0200 From: Sam Ravnborg To: Benjamin Herrenschmidt , Paul Mackerras Subject: [PATCH] powerpc: fix build with make 3.82 Message-ID: <20100803064748.GA19193@merkur.ravnborg.org> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.18 (2008-05-17) Cc: Michal Marek , linuxppc-dev@ozlabs.org, Thomas Backlund X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Errors-To: linuxppc-dev-bounces+patchwork-incoming=ozlabs.org@lists.ozlabs.org Thomas Backlund reported that the powerpc build broke with make 3.82. It failed with the following message: arch/powerpc/Makefile:183: *** mixed implicit and normal rules. Stop. The fix is to avoid mixing non-wildcard and wildcard targets. Reported-by: Thomas Backlund Tested-by: Thomas Backlund Cc: Michal Marek Cc: stable Signed-off-by: Sam Ravnborg --- Hi Ben / Paul. This fixes powerc build with latest make version. The patch is on top of 2.6.35. But it is more of a coincidence that we see a make release right now and this issue is also present in older kernels. So I have added a "Cc: stable " because I consider this relevant for the stable kernel releases too. @Michal - you got a copy as information only. I fear we may see this bug for other parts of the kernel too. Sam diff --git a/arch/powerpc/Makefile b/arch/powerpc/Makefile index 77cfe7a..5d2f17d 100644 --- a/arch/powerpc/Makefile +++ b/arch/powerpc/Makefile @@ -163,9 +163,11 @@ drivers-$(CONFIG_OPROFILE) += arch/powerpc/oprofile/ # Default to zImage, override when needed all: zImage -BOOT_TARGETS = zImage zImage.initrd uImage zImage% dtbImage% treeImage.% cuImage.% simpleImage.% +# With make 3.82 we cannot mix normal and wildcard targets +BOOT_TARGETS1 := zImage zImage.initrd uImaged +BOOT_TARGETS2 := zImage% dtbImage% treeImage.% cuImage.% simpleImage.% -PHONY += $(BOOT_TARGETS) +PHONY += $(BOOT_TARGETS1) $(BOOT_TARGETS2) boot := arch/$(ARCH)/boot @@ -180,10 +182,16 @@ relocs_check: arch/powerpc/relocs_check.pl vmlinux zImage: relocs_check endif -$(BOOT_TARGETS): vmlinux +$(BOOT_TARGETS1): vmlinux + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) +$(BOOT_TARGETS2): vmlinux + $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) + + +bootwrapper_install: $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) -bootwrapper_install %.dtb: +%.dtb: $(Q)$(MAKE) ARCH=ppc64 $(build)=$(boot) $(patsubst %,$(boot)/%,$@) define archhelp