WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [xen-unstable] Rules.mk: adjustments to the .o -> .init.

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] Rules.mk: adjustments to the .o -> .init.o build rule
From: Xen patchbot-unstable <patchbot@xxxxxxx>
Date: Sun, 20 Mar 2011 06:40:28 +0000
Delivery-date: Sat, 19 Mar 2011 23:44:12 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Jan Beulich <jbeulich@xxxxxxxxxx>
# Date 1300465871 0
# Node ID 5ede16d7c12c03eb96c22f5a5e8780cbbd1282cd
# Parent  1bc274e714242707b35311a329604e31f0894747
Rules.mk: adjustments to the .o -> .init.o build rule

First, $(shell ...) getting executed before the containing command gets
invoked doesn't have the intended effect when the inner command wants
variables of the outer command expanded. This needs to be done by the
shell executing the entire command.

Second, pattern rules for intermediate files with their targets not
mentioned explicitly result in them getting deleted. Since the .*.o.d
files get generated on the first make run and included for the second,
the second run sees them mentioned explicitly and re-builds them (and
the final *.init.o files), which is particularly annoying if the second
build is actually an install (as root) while normal builds get run as
ordinary user: Some of the output files will suddenly be root owned,
possibly causing permission issues on a later rebuild.

Signed-off-by: Jan Beulich <jbeulich@xxxxxxxxxx>
Committed-by: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
---


diff -r 1bc274e71424 -r 5ede16d7c12c xen/Rules.mk
--- a/xen/Rules.mk      Thu Mar 17 23:30:35 2011 +0000
+++ b/xen/Rules.mk      Fri Mar 18 16:31:11 2011 +0000
@@ -156,13 +156,13 @@
 SPECIAL_DATA_SECTIONS := rodata $(foreach n,1 2 4 8,rodata.str1.$(n)) \
                         $(foreach r,rel rel.ro,data.$(r) data.$(r).local)
 
-%.init.o: %.o Makefile
+$(filter %.init.o,$(obj-y) $(obj-bin-y)): %.init.o: %.o Makefile
        $(OBJDUMP) -h $< | sed -n '/[0-9]/{s,00*,0,g;p}' | while read idx name 
sz rest; do \
                case "$$name" in \
                .text|.text.*|.data|.data.*|.bss) \
                        test $$sz != 0 || continue; \
                        echo "Error: size of $<:$$name is 0x$$sz" >&2; \
-                       exit $(shell expr $$idx + 1);; \
+                       exit $$(expr $$idx + 1);; \
                esac; \
        done
        $(OBJCOPY) $(foreach s,$(SPECIAL_DATA_SECTIONS),--rename-section 
.$(s)=.init.$(s)) $< $@

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] Rules.mk: adjustments to the .o -> .init.o build rule, Xen patchbot-unstable <=