shithub: scc

Download patch

ref: aa911418f7dfb7fa7f5026d8cd3f52b03e86fc7e
parent: 59fd8e09d75fc7b279a7e4b20fcd0fb7d92e8122
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Thu May 17 11:07:56 EDT 2018

[as] Use LC_COLLATE=C in gentbl.sh

It is better to put the assignation in the own script
instead of forcing every caller to set the variable.

--- a/as/gentbl.sh
+++ b/as/gentbl.sh
@@ -28,6 +28,6 @@
 trap "rm -f $$.c" 0 2 3
 
 awk '!/^$/ {print $1,NR,$2,$3,$4,$5,$6}' target/$family/$family.dat |
-sort -k1 -k2n |
+LC_COLLATE=C sort -k1 -k2n |
 awk -v cpu=`echo $cpu | tr a-z A-Z` -v family=$family -f gentbl.awk  > $$.c &&
 mv $$.c target/$family/${cpu}tbl.c
--- a/as/target/amd64.mk
+++ b/as/target/amd64.mk
@@ -5,6 +5,3 @@
 
 as-amd64: $(AMD64_OBJ) $(LIBDIR)/libscc.a
 	$(CC) $(SCC_LDFLAGS) $(AMD64_OBJ) -lscc -o $@
-
-debug:
-	echo $(AMD64_OBJ)
--- a/as/target/z80.mk
+++ b/as/target/z80.mk
@@ -1,7 +1,7 @@
 Z80_OBJ = $(OBJ) target/x80/z80tbl.o target/x80/z80.o target/x80/ins.o
 
 target/x80/z80tbl.c: gentbl.awk target/x80/x80.dat target/x80/rules.dat
-	LC_ALL=C ./gentbl.sh -f x80 -c z80
+	./gentbl.sh -f x80 -c z80
 
 as-z80: $(OBJ) $(Z80_OBJ) $(LIBDIR)/libscc.a
 	$(CC) $(SCC_LDFLAGS) $(Z80_OBJ) -lscc -o $@