lkml.org 
[lkml]   [2011]   [May]   [17]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RFC][PATCH 2/2] ftrace/kbuild: Add recordmcount files to force full build
    From
    Date
    On Tue, 2011-05-17 at 15:36 +0200, Michal Marek wrote:

    > We could add recordmcount.c as a dependency in scripts/Makefile.build
    > directly, without playing with fixdep, like this (untested):

    I actually tried this first, and it didn't seem to work. I'll go ahead
    and give it another try (maybe I did something wrong). But I do prefer
    this over my fixdep change.

    Thanks, I'll let you know the outcome.

    -- Steve

    >
    > 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)
    >
    > Michal




    \
     
     \ /
      Last update: 2011-05-17 15:49    [W:0.031 / U:92.444 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site