public inbox for linux-ia64@vger.kernel.org
 help / color / mirror / Atom feed
From: Shaohua Li <shaohua.li@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [PATCH 1/6]Make recordmcount destinct module compile
Date: Fri, 09 Jan 2009 02:32:48 +0000	[thread overview]
Message-ID: <1231468368.10683.100.camel@sli10-desk.sh.intel.com> (raw)

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

Index: linux/scripts/Makefile.build
=================================--- linux.orig/scripts/Makefile.build	2009-01-09 09:52:01.000000000 +0800
+++ linux/scripts/Makefile.build	2009-01-09 09:52:36.000000000 +0800
@@ -114,6 +114,7 @@ endif
 # Default is built-in, unless we know otherwise
 modkern_cflags := $(CFLAGS_KERNEL)
 quiet_modtag := $(empty)   $(empty)
+is_module := 0
 
 $(real-objs-m)        : modkern_cflags := $(CFLAGS_MODULE)
 $(real-objs-m:.o=.i)  : modkern_cflags := $(CFLAGS_MODULE)
@@ -125,6 +126,11 @@ $(real-objs-m:.o=.i)  : quiet_modtag := 
 $(real-objs-m:.o=.s)  : quiet_modtag := [M]
 $(real-objs-m:.o=.lst): quiet_modtag := [M]
 
+$(real-objs-m)        : is_module := 1
+$(real-objs-m:.o=.i)  : is_module := 1
+$(real-objs-m:.o=.s)  : is_module := 1
+$(real-objs-m:.o=.lst): is_module := 1
+
 $(obj-m)              : quiet_modtag := [M]
 
 # Default for not multi-part modules
@@ -201,7 +207,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)" \
+	"$(is_module)" "$(@)";
 endif
 
 define rule_cc_o_c
Index: linux/scripts/recordmcount.pl
=================================--- linux.orig/scripts/recordmcount.pl	2009-01-08 16:09:59.000000000 +0800
+++ linux/scripts/recordmcount.pl	2009-01-09 09:52:36.000000000 +0800
@@ -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 = (



             reply	other threads:[~2009-01-09  2:32 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-09  2:32 Shaohua Li [this message]
2009-01-09  2:45 ` [PATCH 1/6]Make recordmcount destinct module compile Steven Rostedt
2009-01-09 19:28   ` Sam Ravnborg
2009-01-09 19:57     ` Steven Rostedt
2009-01-09 20:05       ` Sam Ravnborg
2009-01-12  2:00         ` Shaohua Li

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=1231468368.10683.100.camel@sli10-desk.sh.intel.com \
    --to=shaohua.li@intel.com \
    --cc=linux-ia64@vger.kernel.org \
    /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