public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Steven Rostedt <rostedt@goodmis.org>
To: linux-kernel@vger.kernel.org
Cc: Ingo Molnar <mingo@elte.hu>,
	Andrew Morton <akpm@linux-foundation.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Shaohua Li <shaohua.li@intel.com>,
	ia64 <linux-ia64@vger.kernel.org>,
	Tony Luck <tony.luck@intel.com>, Sam Ravnborg <sam@ravnborg.org>,
	u.kleine-koenig@pengutronix.de,
	Steven Rostedt <srostedt@redhat.com>
Subject: [PATCH 1/9] ftrace, ia64: make recordmcount destinct module compile
Date: Tue, 13 Jan 2009 01:11:11 -0500	[thread overview]
Message-ID: <20090113061147.147906400@goodmis.org> (raw)
In-Reply-To: 20090113061110.856268617@goodmis.org

[-- Attachment #1: 0001-ftrace-ia64-make-recordmcount-destinct-module-comp.patch --]
[-- Type: text/plain, Size: 2454 bytes --]

From: Shaohua Li <shaohua.li@intel.com>

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>
---
 scripts/Makefile.build  |   13 +++++++------
 scripts/recordmcount.pl |    6 +++---
 2 files changed, 10 insertions(+), 9 deletions(-)

diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 5d90030..b5efa98 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
diff --git a/scripts/recordmcount.pl b/scripts/recordmcount.pl
index fe83141..282485a 100755
--- a/scripts/recordmcount.pl
+++ b/scripts/recordmcount.pl
@@ -100,14 +100,14 @@ $P =~ s@.*/@@g;
 
 my $V = '0.1';
 
-if ($#ARGV < 6) {
-	print "usage: $P arch objdump objcopy cc ld nm rm mv inputfile\n";
+if ($#ARGV < 7) {
+	print "usage: $P arch objdump objcopy cc ld nm rm mv is_module inputfile\n";
 	print "version: $V\n";
 	exit(1);
 }
 
 my ($arch, $bits, $objdump, $objcopy, $cc,
-    $ld, $nm, $rm, $mv, $inputfile) = @ARGV;
+    $ld, $nm, $rm, $mv, $is_module, $inputfile) = @ARGV;
 
 # Acceptable sections to record.
 my %text_sections = (
-- 
1.5.6.5

-- 

  reply	other threads:[~2009-01-13  6:12 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-13  6:11 [PATCH 0/9] ftrace: updates for tip Steven Rostedt
2009-01-13  6:11 ` Steven Rostedt [this message]
2009-01-13  6:11 ` [PATCH 2/9] ftrace, ia64: explictly ignore a file in recordmcount.pl Steven Rostedt
2009-01-13  6:11 ` [PATCH 3/9] ftrace, ia64: Add macro for ftrace_caller Steven Rostedt
2009-01-13  6:11 ` [PATCH 4/9] ftrace, ia64: Add recordmcount for ia64 Steven Rostedt
2009-01-13  6:11 ` [PATCH 5/9] ftrace, ia64: IA64 static ftrace support Steven Rostedt
2009-01-13  6:11 ` [PATCH 6/9] ftrace, ia64: IA64 dynamic " Steven Rostedt
2009-01-13  6:11 ` [PATCH 7/9] tracing/ftrace: separate events tracing and stats tracing engine Steven Rostedt
2009-01-13  6:11 ` [PATCH 8/9] tracing: add a new workqueue tracer Steven Rostedt
2009-01-13  6:11 ` [PATCH 9/9] ftrace, trivial: fix typo "resgister" -> "register" Steven Rostedt
2009-01-13  8:03   ` Uwe Kleine-König
2009-01-13 13:04     ` Steven Rostedt
2009-01-13 14:06 ` [PATCH 0/9] ftrace: updates for tip Steven Rostedt
2009-01-13 16:54   ` Steven Rostedt
2009-01-14 11:12     ` Ingo Molnar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090113061147.147906400@goodmis.org \
    --to=rostedt@goodmis.org \
    --cc=akpm@linux-foundation.org \
    --cc=fweisbec@gmail.com \
    --cc=linux-ia64@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=sam@ravnborg.org \
    --cc=shaohua.li@intel.com \
    --cc=srostedt@redhat.com \
    --cc=tony.luck@intel.com \
    --cc=u.kleine-koenig@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox