aboutsummaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-05-17 09:36:46 -0400
committerSteven Rostedt <rostedt@goodmis.org>2011-05-17 10:41:08 -0400
commit44e6a2069122dbec29d25b8ced3f59f5626a97d7 (patch)
treea008f326feb1c386d86f08e27246151873291df6 /scripts
parent449a66fd1fa75d36dca917704827c40c8f416bca (diff)
ftrace/kbuild: Add recordmcount files to force full build
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 main dependencies to make sure any change to them causes a full recompile. Signed-off-by: Michal Marek <mmarek@suse.cz> Link: http://lkml.kernel.org/r/20110517133646.GP13293@sepie.suse.cz Signed-off-by: Steven Rostedt <rostedt@goodmis.org>
Diffstat (limited to 'scripts')
-rw-r--r--scripts/Makefile.build7
1 files changed, 5 insertions, 2 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index d5f925abe4d2..7d3f9036eee2 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -252,6 +252,8 @@ sub_cmd_record_mcount = \
252 if [ $(@) != "scripts/mod/empty.o" ]; then \ 252 if [ $(@) != "scripts/mod/empty.o" ]; then \
253 $(objtree)/scripts/recordmcount "$(@)"; \ 253 $(objtree)/scripts/recordmcount "$(@)"; \
254 fi; 254 fi;
255recordmcount_source := $(srctree)/scripts/recordmcount.c \
256 $(srctree)/scripts/recordmcount.h
255else 257else
256sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \ 258sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
257 "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \ 259 "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
@@ -259,6 +261,7 @@ sub_cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH
259 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \ 261 "$(OBJDUMP)" "$(OBJCOPY)" "$(CC) $(KBUILD_CFLAGS)" \
260 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \ 262 "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
261 "$(if $(part-of-module),1,0)" "$(@)"; 263 "$(if $(part-of-module),1,0)" "$(@)";
264recordmcount_source := $(srctree)/scripts/recordmcount.pl
262endif 265endif
263cmd_record_mcount = \ 266cmd_record_mcount = \
264 if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \ 267 if [ "$(findstring -pg,$(_c_flags))" = "-pg" ]; then \
@@ -279,13 +282,13 @@ define rule_cc_o_c
279endef 282endef
280 283
281# Built-in and composite module parts 284# Built-in and composite module parts
282$(obj)/%.o: $(src)/%.c FORCE 285$(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE
283 $(call cmd,force_checksrc) 286 $(call cmd,force_checksrc)
284 $(call if_changed_rule,cc_o_c) 287 $(call if_changed_rule,cc_o_c)
285 288
286# Single-part modules are special since we need to mark them in $(MODVERDIR) 289# Single-part modules are special since we need to mark them in $(MODVERDIR)
287 290
288$(single-used-m): $(obj)/%.o: $(src)/%.c FORCE 291$(single-used-m): $(obj)/%.o: $(src)/%.c $(recordmcount_source) FORCE
289 $(call cmd,force_checksrc) 292 $(call cmd,force_checksrc)
290 $(call if_changed_rule,cc_o_c) 293 $(call if_changed_rule,cc_o_c)
291 @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod) 294 @{ echo $(@:.o=.ko); echo $@; } > $(MODVERDIR)/$(@F:.o=.mod)