ref: ff62da50adc533c960598177f019b793994106d4
parent: 60e5ff036844491e3ad78a4254171c218dec98c9
author: zerous Naveen Narayanan <zerous@nocebo.space>
date: Sat Dec 29 07:38:16 EST 2018
Fix sort in mktbl LC_ALL, if set, takes precedence over LC_COLLATE causing sort to misbehave thereby generating skewed tables.
--- a/src/as/mktbl
+++ b/src/as/mktbl
@@ -1,6 +1,8 @@
#!/bin/sh
+unset LC_ALL
+LC_COLLATE=C
set -e
for i
@@ -27,6 +29,6 @@
trap "rm -f $$.c" 0 2 3
awk '!/^$/ {print $1,NR,$2,$3,$4,$5,$6}' target/$family/$family.dat |
-LC_COLLATE=C sort -k1 -k2n |
+sort -k1 -k2n |
awk -v cpu=`echo $cpu | tr a-z A-Z` -v family=$family -f mktbl.awk > $$.c &&
mv $$.c target/$family/${cpu}tbl.c