Re: [RFC] better fix? (was: Re: [PATCH][GIT PULL] ftrace: Removerecursion between recordmcount and scripts/mod/empty)

From: Sam Ravnborg
Date: Mon Oct 18 2010 - 15:36:04 EST


On Mon, Oct 18, 2010 at 03:13:26PM -0400, Steven Rostedt wrote:
> On Mon, 2010-10-18 at 14:53 -0400, Steven Rostedt wrote:
>
> Just calling attention to this...
>
> > diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> > index 4db60b2..9f2d5b4 100644
> > --- a/scripts/Makefile.build
> > +++ b/scripts/Makefile.build
> > @@ -210,7 +210,11 @@ endif
> >
> > ifdef CONFIG_FTRACE_MCOUNT_RECORD
> > ifdef BUILD_C_RECORDMCOUNT
> > -cmd_record_mcount = $(objtree)/scripts/recordmcount "$(@)";
> > +# Due to recursion, we must skip the empty.o file
> > +# TBD: Find a better way to do this.
> > +cmd_record_mcount = if [ $(@) != "scripts/mod/empty.o" ]; then \
> > + $(objtree)/scripts/recordmcount "$(@)"; \
> > + fi;
> > else
> > cmd_record_mcount = set -e ; perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
> > "$(if $(CONFIG_CPU_BIG_ENDIAN),big,little)" \
> >
>
> This is pretty much a hack, would adding a patch like the following be a
> better idea?

I prefer the hack above...
It is obvious what it does. And the hack is simple.

An additional comment about the origin of empty.o is needed.
Only very few people knows that we generate empty.o in scripts/

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/