ftrace, ia64: make recordmcount distinct module compile
In IA64, module build and kernel build use different option. Make recordmcount.pl differentiate the two cases. Signed-off-by: Shaohua Li <shaohua.li@intel.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: Steven Rostedt <srostedt@redhat.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
173ed24ee2
commit
18c167fd6d
|
@ -112,13 +112,13 @@ endif
|
||||||
# ---------------------------------------------------------------------------
|
# ---------------------------------------------------------------------------
|
||||||
|
|
||||||
# Default is built-in, unless we know otherwise
|
# Default is built-in, unless we know otherwise
|
||||||
modkern_cflags := $(CFLAGS_KERNEL)
|
modkern_cflags = $(if $(part-of-module), $(CFLAGS_MODULE), $(CFLAGS_KERNEL))
|
||||||
quiet_modtag := $(empty) $(empty)
|
quiet_modtag := $(empty) $(empty)
|
||||||
|
|
||||||
$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE)
|
$(real-objs-m) : part-of-module := y
|
||||||
$(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE)
|
$(real-objs-m:.o=.i) : part-of-module := y
|
||||||
$(real-objs-m:.o=.s) : modkern_cflags := $(CFLAGS_MODULE)
|
$(real-objs-m:.o=.s) : part-of-module := y
|
||||||
$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE)
|
$(real-objs-m:.o=.lst): part-of-module := y
|
||||||
|
|
||||||
$(real-objs-m) : quiet_modtag := [M]
|
$(real-objs-m) : quiet_modtag := [M]
|
||||||
$(real-objs-m:.o=.i) : quiet_modtag := [M]
|
$(real-objs-m:.o=.i) : quiet_modtag := [M]
|
||||||
|
@ -215,7 +215,8 @@ endif
|
||||||
ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
ifdef CONFIG_FTRACE_MCOUNT_RECORD
|
||||||
cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
|
cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
|
||||||
"$(if $(CONFIG_64BIT),64,32)" \
|
"$(if $(CONFIG_64BIT),64,32)" \
|
||||||
"$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" "$(@)";
|
"$(OBJDUMP)" "$(OBJCOPY)" "$(CC)" "$(LD)" "$(NM)" "$(RM)" "$(MV)" \
|
||||||
|
"$(if $(part-of-module),1,0)" "$(@)";
|
||||||
endif
|
endif
|
||||||
|
|
||||||
define rule_cc_o_c
|
define rule_cc_o_c
|
||||||
|
|
|
@ -100,14 +100,14 @@ $P =~ s@.*/@@g;
|
||||||
|
|
||||||
my $V = '0.1';
|
my $V = '0.1';
|
||||||
|
|
||||||
if ($#ARGV < 6) {
|
if ($#ARGV < 7) {
|
||||||
print "usage: $P arch objdump objcopy cc ld nm rm mv inputfile\n";
|
print "usage: $P arch objdump objcopy cc ld nm rm mv is_module inputfile\n";
|
||||||
print "version: $V\n";
|
print "version: $V\n";
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
my ($arch, $bits, $objdump, $objcopy, $cc,
|
my ($arch, $bits, $objdump, $objcopy, $cc,
|
||||||
$ld, $nm, $rm, $mv, $inputfile) = @ARGV;
|
$ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
|
||||||
|
|
||||||
# Acceptable sections to record.
|
# Acceptable sections to record.
|
||||||
my %text_sections = (
|
my %text_sections = (
|
||||||
|
|
Loading…
Reference in New Issue