Date: Wed, 13 Dec 2000 22:46:45 +1100 From: Benno Rice <benno@FreeBSD.org> To: freebsd-current@freebsd.org Subject: Patch to allow overriding of nm in lorder, genassym.sh Message-ID: <20001213224645.A16171@rafe.jeamland.net>
next in thread | raw e-mail | index | archive | help
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
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
benno@FreeBSD.org
--8t9RHnE3ZwKMSgU+
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="nm.diff"
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 ,
--8t9RHnE3ZwKMSgU+--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20001213224645.A16171>
