summaryrefslogtreecommitdiff
path: root/scripts/Makefile.build
diff options
context:
space:
mode:
authorShaohua Li <shaohua.li@intel.com>2009-01-12 10:00:51 +0800
committerIngo Molnar <mingo@elte.hu>2009-01-14 12:11:08 +0100
commit18c167fd6d8feec5d337bd8fbc3a17da4cc37652 (patch)
tree708af98f3ba3622384fc8a27bbbc5b0f3c038b97 /scripts/Makefile.build
parent173ed24ee2d64f5de28654eb456ec1ee18a142e5 (diff)
downloadlinux-3.10-18c167fd6d8feec5d337bd8fbc3a17da4cc37652.tar.gz
linux-3.10-18c167fd6d8feec5d337bd8fbc3a17da4cc37652.tar.bz2
linux-3.10-18c167fd6d8feec5d337bd8fbc3a17da4cc37652.zip
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>
Diffstat (limited to 'scripts/Makefile.build')
-rw-r--r--scripts/Makefile.build13
1 files changed, 7 insertions, 6 deletions
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5d900307de3..b5efa98994b 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -112,13 +112,13 @@ endif
# ---------------------------------------------------------------------------
# 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)
-$(real-objs-m) : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.i) : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.s) : modkern_cflags := $(CFLAGS_MODULE)
-$(real-objs-m:.o=.lst): modkern_cflags := $(CFLAGS_MODULE)
+$(real-objs-m) : part-of-module := y
+$(real-objs-m:.o=.i) : part-of-module := y
+$(real-objs-m:.o=.s) : part-of-module := y
+$(real-objs-m:.o=.lst): part-of-module := y
$(real-objs-m) : quiet_modtag := [M]
$(real-objs-m:.o=.i) : quiet_modtag := [M]
@@ -215,7 +215,8 @@ endif
ifdef CONFIG_FTRACE_MCOUNT_RECORD
cmd_record_mcount = perl $(srctree)/scripts/recordmcount.pl "$(ARCH)" \
"$(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
define rule_cc_o_c