lkml.org 
[lkml]   [2006]   [Mar]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
Subject[PATCH] Fix scripts/namespace.pl portability
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'}));
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2006-03-09 14:04    [W:0.044 / U:0.604 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site