Subject: toolchain/33834: FC5 sort doesn't accept '+' argument
To: None <toolchain-manager@netbsd.org, gnats-admin@netbsd.org,>
From: Bucky Katz <bucky@picovex.com>
List: netbsd-bugs
Date: 06/27/2006 00:05:00
>Number: 33834
>Category: toolchain
>Synopsis: Crossbuild on FC5:sort doesn't handle '+' field specifications
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: toolchain-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Jun 27 00:05:00 +0000 2006
>Originator: Bucky Katz
>Release: NetBSD 3.99.20
>Organization:
picovex
>Environment:
Linux Crossdevelopment on Fedora Core 5
>Description:
attempting to use build.sh to crossbuild netbsd 3.0-current
fails because FC5 sort doesn't handle the '+' option
>How-To-Repeat:
checkout netbsd 3.0-current
sh build.sh -m evbarm tools
>Fix:
Index: netbsd_quilt/src/usr.bin/lorder/lorder.sh
===================================================================
--- netbsd_quilt.orig/src/usr.bin/lorder/lorder.sh 2005-01-04 19:12:38.000000000 -0800
+++ netbsd_quilt/src/usr.bin/lorder/lorder.sh 2006-05-11 11:13:49.000000000 -0700
@@ -102,8 +102,8 @@
sed -ne 's/:.* [TDGR] / /p' <$N >$S
sed -ne 's/:.* U / /p' <$N >$R
-# sort symbols and references on the first field (the symbol)
+# sort symbols and references on the second field (the symbol)
# join on that field, and print out the file names.
-sort +1 $R -o $R
-sort +1 $S -o $S
+sort -k2 $R -o $R
+sort -k2 $S -o $S
join -j 2 -o 1.1,2.1 $R $S
Index: netbsd_quilt/src/bin/ksh/siglist.sh
===================================================================
--- netbsd_quilt.orig/src/bin/ksh/siglist.sh 1997-01-12 11:12:18.000000000 -0800
+++ netbsd_quilt/src/bin/ksh/siglist.sh 2006-05-11 12:44:03.000000000 -0700
@@ -23,7 +23,7 @@
{ QwErTy SIG\1 , "\1", "\2" },\
#endif/') > $in
$CPP $in > $out
-sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort +2n +0n |
+sed -n 's/{ QwErTy/{/p' < $out | awk '{print NR, $0}' | sort -k3 -n -k 1 -n |
sed 's/^[0-9]* //' |
awk 'BEGIN { last=0; nsigs=0; }
{