Does anyone object to me committing the attached patch?

It basically allows the overriding of nm in lorder(1) and sys/kern/genassym.sh
using the environment variable NM.

I've been using this locally as I've been building with 'powerpc-elf-nm'
rather than nm.

Comments?  Objections?  Review? =)

-- 
Benno Rice
[EMAIL PROTECTED]
Index: sys/kern/genassym.sh
===================================================================
RCS file: /home/ncvs/src/sys/kern/genassym.sh,v
retrieving revision 1.1
diff -u -r1.1 genassym.sh
--- sys/kern/genassym.sh        2000/06/02 09:27:48     1.1
+++ sys/kern/genassym.sh        2000/12/13 11:48:32
@@ -22,7 +22,9 @@
 *)     usage;;
 esac
 
-nm "$1" | awk '
+# If the environment variable NM is set, use that.
+# Otherwise use 'nm' and hope it's in the path.
+${NM:='nm'} "$1" | awk '
 / C .*sign$/ {
        sign = substr($1, length($1) - 3, 4)
        sub("^0*", "", sign)
Index: usr.bin/lorder/lorder.sh
===================================================================
RCS file: /home/ncvs/src/usr.bin/lorder/lorder.sh,v
retrieving revision 1.3
diff -u -r1.3 lorder.sh
--- usr.bin/lorder/lorder.sh    2000/05/17 22:46:47     1.3
+++ usr.bin/lorder/lorder.sh    2000/11/05 05:09:48
@@ -63,7 +63,10 @@
 #
 # if the line has " U " it's a globally undefined symbol, put it into
 # the reference file.
-nm -go $* | sed "
+#
+# if the variable NM is set, use that as our nm executable.  Otherwise trust
+# the path.
+${NM:="nm"} -go $* | sed "
        / [TD] / {
                s/:.* [TD] / /
                w $S
Index: usr.bin/lorder/lorder.1
===================================================================
RCS file: /home/ncvs/src/usr.bin/lorder/lorder.1,v
retrieving revision 1.5
diff -u -r1.5 lorder.1
--- usr.bin/lorder/lorder.1     1999/08/28 01:03:16     1.5
+++ usr.bin/lorder/lorder.1     2000/12/13 11:47:47
@@ -61,6 +61,12 @@
 .Bd -literal -offset indent
 ar cr library.a `lorder ${OBJS} | tsort`
 .Ed
+.Sh ENVIRONMENT
+If the environment variable 
+.Ev NM
+is set, it is used instead of
+.Xr nm 1
+in determining interdependancies.
 .Sh SEE ALSO
 .Xr ar 1 ,
 .Xr ld 1 ,

Reply via email to