All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: Linus Torvalds <torvalds@osdl.org>
Cc: linux-kernel@vger.kernel.org, Andrew Morton <akpm@osdl.org>
Subject: [PATCH] Fix scripts/namespace.pl portability
Date: Thu, 9 Mar 2006 13:01:50 +0000	[thread overview]
Message-ID: <20060309130150.GA10275@linux-mips.org> (raw)

scripts/namespace.pl was assuming the nm and objdump tools to use are
always just named that which breaks things in a crosscompilation
environment.

Fixed by honouring $NM and $OBJDUMP if passed by make, otherwise
defaulting to just nm rsp. objdump just as we used to.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>

---
 scripts/namespace.pl |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/scripts/namespace.pl b/scripts/namespace.pl
index 88e30e8..59dcb25 100644
--- a/scripts/namespace.pl
+++ b/scripts/namespace.pl
@@ -66,8 +66,14 @@ require 5;	# at least perl 5
 use strict;
 use File::Find;
 
-my $nm = "/usr/bin/nm -p";
-my $objdump = "/usr/bin/objdump -s -j .comment";
+my $nm = "nm";
+$nm = "$ENV{'NM'}" if (exists($ENV{'NM'}));
+$nm = "$nm" . " -p";
+my $objdump = "objdump";
+
+$objdump = "$ENV{'OBJDUMP'}" if (exists($ENV{'OBJDUMP'}));
+$objdump = $objdump . " -s -j .comment";
+
 my $srctree = "";
 my $objtree = "";
 $srctree = "$ENV{'srctree'}/" if (exists($ENV{'srctree'}));

             reply	other threads:[~2006-03-09 13:01 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-03-09 13:01 Ralf Baechle [this message]
2006-03-09 15:40 ` [PATCH] Fix scripts/namespace.pl portability Ralf Baechle
2006-03-09 16:33   ` Sam Ravnborg

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=20060309130150.GA10275@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.