shithub: scc

Download patch

ref: fe1c4b0df744e9773a52356baaa91024c8e83e31
parent: 6b1309ac40e3f1842f42b5fbd995b40dbf8e3932
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu Jun 30 12:52:53 EDT 2022

as: Force C locale when sorting

Sort behaviour depends of the environment locale but
as expects a C locale sorted array. For that reason
mktbl.awk is executed under a C locale.

--- a/src/cmd/as/mktbl
+++ b/src/cmd/as/mktbl
@@ -30,5 +30,5 @@
 
 awk '!/^$/ {print $1,NR,$2,$3,$4,$5,$6}' target/$family/ops.dat |
 sort -k1 -k2n |
-awk -v cpu=`echo $cpu | tr a-z A-Z` -v family=$family -f mktbl.awk  > $$.c &&
+LC_ALL=C awk -v cpu=`echo $cpu | tr a-z A-Z` -v family=$family -f mktbl.awk  > $$.c &&
 mv $$.c target/$family/${cpu}tbl.c