public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix scripts/namespace.pl portability
@ 2006-03-09 13:01 Ralf Baechle
  2006-03-09 15:40 ` Ralf Baechle
  0 siblings, 1 reply; 3+ messages in thread
From: Ralf Baechle @ 2006-03-09 13:01 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel, Andrew Morton

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'}));

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2006-03-09 16:34 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-03-09 13:01 [PATCH] Fix scripts/namespace.pl portability Ralf Baechle
2006-03-09 15:40 ` Ralf Baechle
2006-03-09 16:33   ` Sam Ravnborg

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox