From patchwork Fri Aug 12 19:00:02 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Boyd X-Patchwork-Id: 1061972 Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) by demeter2.kernel.org (8.14.4/8.14.4) with ESMTP id p7CJ0Ooc016352 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Fri, 12 Aug 2011 19:00:47 GMT Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qrwxq-0006g7-TX; Fri, 12 Aug 2011 19:00:15 +0000 Received: from localhost ([127.0.0.1] helo=canuck.infradead.org) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qrwxq-0005pR-Dk; Fri, 12 Aug 2011 19:00:14 +0000 Received: from wolverine02.qualcomm.com ([199.106.114.251]) by canuck.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1Qrwxm-0005p8-IA for linux-arm-kernel@lists.infradead.org; Fri, 12 Aug 2011 19:00:11 +0000 X-IronPort-AV: E=McAfee;i="5400,1158,6436"; a="109796389" Received: from pdmz-ns-mip.qualcomm.com (HELO mostmsg01.qualcomm.com) ([199.106.114.10]) by wolverine02.qualcomm.com with ESMTP/TLS/ADH-AES256-SHA; 12 Aug 2011 12:00:04 -0700 Received: from sboyd-linux.qualcomm.com (pdmz-snip-v218.qualcomm.com [192.168.218.1]) by mostmsg01.qualcomm.com (Postfix) with ESMTPA id 41A7410004D8; Fri, 12 Aug 2011 12:00:04 -0700 (PDT) From: Stephen Boyd To: Sam Ravnborg Subject: [PATCH] ARM: zImage: Skip relinking if nothing changes Date: Fri, 12 Aug 2011 12:00:02 -0700 Message-Id: <1313175602-21834-1-git-send-email-sboyd@codeaurora.org> X-Mailer: git-send-email 1.7.6.409.ge7a85 In-Reply-To: <4E457682.5020107@codeaurora.org> X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.7.6 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110812_150011_127231_D3813A60 X-CRM114-Status: GOOD ( 16.61 ) X-Spam-Score: -2.3 (--) X-Spam-Report: SpamAssassin version 3.3.1 on canuck.infradead.org summary: Content analysis details: (-2.3 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at http://www.dnswl.org/, medium trust [199.106.114.251 listed in list.dnswl.org] Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kbuild@vger.kernel.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: linux-arm-kernel-bounces@lists.infradead.org Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.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 19:00:47 +0000 (UTC) lib1funcs.S is reshipped even though the file hasn't changed because the make rule is marked with FORCE. According to Sam Ravnborg: 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. This fixes the shipped problem, but we still have to reassemble lib1funcs.S because it isn't part of $targets. Add lib1funcs.{S,o} to $targets to avoid relinking the compressed vmlinux if nothing changes. Signed-off-by: Stephen Boyd Acked-by: Sam Ravnborg --- arch/arm/boot/compressed/Makefile | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/arch/arm/boot/compressed/Makefile b/arch/arm/boot/compressed/Makefile index 0c74a6f..937fd26 100644 --- a/arch/arm/boot/compressed/Makefile +++ b/arch/arm/boot/compressed/Makefile @@ -91,7 +91,7 @@ suffix_$(CONFIG_KERNEL_LZMA) = lzma targets := vmlinux vmlinux.lds \ piggy.$(suffix_y) piggy.$(suffix_y).o \ - font.o font.c head.o misc.o $(OBJS) + font.o font.c head.o misc.o lib1funcs.o lib1funcs.S $(OBJS) # Make sure files are removed during clean extra-y += piggy.gzip piggy.lzo piggy.lzma lib1funcs.S @@ -121,9 +121,7 @@ LDFLAGS_vmlinux += -X 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 @@ -140,7 +138,7 @@ bad_syms=$$($(CROSS_COMPILE)nm $@ | sed -n 's/^.\{8\} [bc] \(.*\)/\1/p') && \ echo "$$bad_syms" >&2; rm -f $@; false ) $(obj)/vmlinux: $(obj)/vmlinux.lds $(obj)/$(HEAD) $(obj)/piggy.$(suffix_y).o \ - $(addprefix $(obj)/, $(OBJS)) $(lib1funcs) FORCE + $(addprefix $(obj)/, $(OBJS)) $(obj)/lib1funcs.o FORCE $(call if_changed,ld) @$(check_for_bad_syms)