Messages in this thread Patch in this message | | | Date | Thu, 9 Mar 2006 13:01:50 +0000 | From | Ralf Baechle <> | 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/
| |