linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: sboyd@codeaurora.org (Stephen Boyd)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] ARM: zImage: Skip relinking if nothing changes
Date: Fri, 12 Aug 2011 12:00:02 -0700	[thread overview]
Message-ID: <1313175602-21834-1-git-send-email-sboyd@codeaurora.org> (raw)
In-Reply-To: <4E457682.5020107@codeaurora.org>

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 <sboyd@codeaurora.org>
Acked-by: Sam Ravnborg <sam@ravnborg.org>
---
 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)
 
-- 
Sent by an employee of the Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum.

  reply	other threads:[~2011-08-12 19:00 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-12 17:46 Relinking zImage when nothing changes Stephen Boyd
2011-08-12 18:02 ` Sam Ravnborg
2011-08-12 18:12   ` Stephen Boyd
2011-08-12 18:34     ` Sam Ravnborg
2011-08-12 18:52       ` Stephen Boyd
2011-08-12 19:00         ` Stephen Boyd [this message]
2011-08-12 20:48           ` [PATCH] ARM: zImage: Skip relinking if " Arnaud Lacombe
2011-08-12 20:55             ` Russell King - ARM Linux
2011-08-12 21:41               ` Arnaud Lacombe
2011-08-12 22:03                 ` Sam Ravnborg
2011-08-12 22:17                   ` Arnaud Lacombe
2011-08-13  6:34                     ` Sam Ravnborg
2011-08-13 16:02                       ` Arnaud Lacombe
2011-08-12 22:32             ` Arnaud Lacombe
2011-08-18  3:44               ` Nicolas Pitre
2011-08-18 18:03                 ` Arnaud Lacombe
2011-08-18 19:31                   ` Russell King - ARM Linux
2011-08-18 22:25                     ` Troy Kisky
2011-08-18 22:38                       ` Arnaud Lacombe
2011-08-12 20:20   ` Relinking zImage when " Arnaud Lacombe
2011-08-12 20:24     ` Sam Ravnborg
2011-08-12 20:31       ` Arnaud Lacombe

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=1313175602-21834-1-git-send-email-sboyd@codeaurora.org \
    --to=sboyd@codeaurora.org \
    --cc=linux-arm-kernel@lists.infradead.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).