From patchwork Fri Aug 12 18:02:09 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sam Ravnborg X-Patchwork-Id: 1061862 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7CI2CGE011526 for ; Fri, 12 Aug 2011 18:02:12 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751234Ab1HLSCL (ORCPT ); Fri, 12 Aug 2011 14:02:11 -0400 Received: from smtp.snhosting.dk ([87.238.248.203]:63060 "EHLO smtp.domainteam.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751067Ab1HLSCL (ORCPT ); Fri, 12 Aug 2011 14:02:11 -0400 Received: from merkur.ravnborg.org (x1-6-c4-3d-c7-28-70-1a.k498.webspeed.dk [83.89.83.41]) by smtp.domainteam.dk (Postfix) with ESMTPA id 6787CF1989; Fri, 12 Aug 2011 20:02:09 +0200 (CEST) Date: Fri, 12 Aug 2011 20:02:09 +0200 From: Sam Ravnborg To: Stephen Boyd Cc: "linux-arm-kernel@lists.infradead.org" , linux-kbuild@vger.kernel.org, Peter Foley Subject: Re: Relinking zImage when nothing changes Message-ID: <20110812180209.GA28520@merkur.ravnborg.org> References: <4E4566F0.4020001@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <4E4566F0.4020001@codeaurora.org> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kbuild-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kbuild@vger.kernel.org X-Greylist: IP, sender and recipient auto-whitelisted, not delayed by milter-greylist-4.2.6 (demeter2.kernel.org [140.211.167.43]); Fri, 12 Aug 2011 18:02:12 +0000 (UTC) On Fri, Aug 12, 2011 at 10:46:24AM -0700, Stephen Boyd wrote: > I was hoping with the recent patch e78e8f2 (kernel: prevent unnecessary > rebuilding due to config_data.gz, 2011-07-05) compiling ARM linux a > second time would amount to no more linking. This doesn't seem to be the > case though. Doing a make V=2 I see that lib1funcs.S is shipped and thus > we have to recompile it although nothing actually changed. This in turn > requires us to relink the compressed vmlinux and then recreate the zImage. > > Kernel: arch/arm/boot/Image is ready > SHIPPED arch/arm/boot/compressed/lib1funcs.S - due to missing .cmd file > AS arch/arm/boot/compressed/lib1funcs.o - due to: arch/arm/boot/compressed/lib1funcs.S > LD arch/arm/boot/compressed/vmlinux - due to: arch/arm/boot/compressed/lib1funcs.o > OBJCOPY arch/arm/boot/zImage - due to: arch/arm/boot/compressed/vmlinux > Kernel: arch/arm/boot/zImage is ready > > > Is there any way to avoid this? Perhaps the shipped command could become > a bit wiser? Following patch will likely fix it: (cut'n'pasted ...) The FORCE prerequisite will tell make to always execute the command. But we only want to execute the command if: 1) $(obj)/lib1funcs.S is missing 2) or $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S is not older then $(obj)/lib1funcs.S So dropping FORCE should be a safe thing to do. Sam --- To unsubscribe from this list: send the line "unsubscribe linux-kbuild" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 0c74a6f..80b6b6e 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -123,7 +123,7 @@ LDFLAGS_vmlinux += -T # For __aeabi_uidivmod lib1funcs = $(obj)/lib1funcs.o -$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S FORCE +$(obj)/lib1funcs.S: $(srctree)/arch/$(SRCARCH)/lib/lib1funcs.S $(call cmd,shipped) # We need to prevent any GOTOFF relocs being used with references