From patchwork Tue May 17 13:36:46 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michal Marek X-Patchwork-Id: 791582 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by demeter2.kernel.org (8.14.4/8.14.3) with ESMTP id p4HDaoRc003009 for ; Tue, 17 May 2011 13:36:50 GMT Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754364Ab1EQNgu (ORCPT ); Tue, 17 May 2011 09:36:50 -0400 Received: from cantor2.suse.de ([195.135.220.15]:47212 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753888Ab1EQNgt (ORCPT ); Tue, 17 May 2011 09:36:49 -0400 Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.221.2]) by mx2.suse.de (Postfix) with ESMTP id 8D7A58726A; Tue, 17 May 2011 15:36:48 +0200 (CEST) Received: by sepie.suse.cz (Postfix, from userid 10020) id 4263876626; Tue, 17 May 2011 15:36:46 +0200 (CEST) Date: Tue, 17 May 2011 15:36:46 +0200 From: Michal Marek To: Steven Rostedt Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org, Andrew Morton Subject: Re: [RFC][PATCH 2/2] ftrace/kbuild: Add recordmcount files to force full build Message-ID: <20110517133646.GP13293@sepie.suse.cz> References: <20110517021027.390391519@goodmis.org> <20110517021423.661004726@goodmis.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20110517021423.661004726@goodmis.org> User-Agent: Mutt/1.5.21 (2010-09-15) 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]); Tue, 17 May 2011 13:36:51 +0000 (UTC) On Mon, May 16, 2011 at 10:10:29PM -0400, Steven Rostedt wrote: > From: Steven Rostedt > > Modifications to recordmcount must be performed on all object > files to stay consistent with what the kernel code may expect. > Add the recordmcount files to the force-deps to make sure > any change to them causes a full recompile. > > Signed-off-by: Steven Rostedt > --- > scripts/Makefile.build | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/scripts/Makefile.build b/scripts/Makefile.build > index 0ff5a58..057d6e9 100644 > --- a/scripts/Makefile.build > +++ b/scripts/Makefile.build > @@ -252,6 +252,7 @@ sub_cmd_record_mcount = \ > if [ $(@) != "scripts/mod/empty.o" ]; then \ > $(objtree)/scripts/recordmcount "$(@)"; \ > fi; > +force-deps += $(srctree)/scripts/recordmcount.c $(srctree)/scripts/recordmcount.h > else > sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ > "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ > @@ -259,6 +260,7 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH > "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ > "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ > "$(if $(part-of-module),1,0)" "$(@)"; > +force-deps += $(srctree)/scripts/recordmcount.pl > endif > cmd_record_mcount = \ > if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ We could add recordmcount.c as a dependency in scripts/Makefile.build directly, without playing with fixdep, like this (untested): Michal Signed-off-by: Michal Marek --- 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/scripts/Makefile.build b/scripts/Makefile.build index f133641..bc2c8d3 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -268,6 +268,7 @@ sub_cmd_record_mcount = \ if [ $(@) != "scripts/mod/empty.o" ]; then \ $(objtree)/scripts/recordmcount "$(@)"; \ fi; +recordmcount_source := $(srctree)/scripts/recordmcount.c else sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ @@ -275,6 +276,7 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ "$(if $(part-of-module),1,0)" "$(@)"; +recordmcount_source := $(srctree)/scripts/recordmcount.pl endif cmd_record_mcount = \ if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ @@ -295,13 +297,13 @@ define rule_cc_o_c endef # Built-in and composite module parts -$(obj)/%.o: $(src)/%.c FORCE +$(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) # Single-part modules are special since we need to mark them in $(MODVERDIR) -$(single-used-m): $(obj)/%.o: $(src)/%.c FORCE +$(single-used-m): $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE $(call cmd,force_checksrc) $(call if_changed_rule,cc_o_c) @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)