commit 30a206ccf778fd87149c44335476c2c1962ce151 parent b6a4308de39e33c29986ebbce01f883ce9fd72af Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Sat, 30 Oct 2021 22:15:39 +0200 scc: Use scc prefix for tools Scc is in an early stage and it is not stable enough to be used instead of the systems tools. For this reason this patch renames all the binaries to have a scc- prefix that avoid executing the wrong tool at the wrong moment. This patch also adds a new tool called scc that sets automatically the value of SCCPREFIX based in the name of the program and simplify executing scc from a directory different than $PREFIX. Diffstat:
62 files changed, 152 insertions(+), 138 deletions(-)
diff --git a/scripts/proto.all b/scripts/proto.all @@ -1,21 +1,23 @@ d 755 bin -f 755 bin/ld -f 755 bin/cpp -f 755 bin/cc -f 755 bin/nm -f 755 bin/objdump -f 755 bin/addr2line -f 755 bin/objcopy -f 755 bin/strip -f 755 bin/ranlib -f 755 bin/size -f 755 bin/ar +f 755 bin/scc-size +f 755 bin/scc-ar +f 755 bin/scc +f 755 bin/scc-cpp +f 755 bin/scc-objdump +f 755 bin/scc-nm +f 755 bin/scc-strip +f 755 bin/scc-ranlib +f 755 bin/scc-ld +f 755 bin/scc-objcopy +f 755 bin/scc-cc +f 755 bin/scc-addr2line d 755 libexec d 755 libexec/scc f 755 libexec/scc/as-i386 f 755 libexec/scc/as-i286 f 755 libexec/scc/cc2-qbe_amd64-sysv f 755 libexec/scc/as-powerpc64 +f 755 libexec/scc/qbe f 755 libexec/scc/cc2-i386-sysv f 755 libexec/scc/cc1 f 755 libexec/scc/as-powerpc @@ -24,7 +26,6 @@ f 755 libexec/scc/as-amd64 f 755 libexec/scc/cc2-amd64-sysv f 755 libexec/scc/cc2-z80-scc f 755 libexec/scc/as-z80 -f 755 libexec/scc/qbe d 755 include f 644 include/string.h f 644 include/wchar.h diff --git a/src/cmd/Makefile b/src/cmd/Makefile @@ -10,14 +10,15 @@ PROJECTDIR = ../.. include $(PROJECTDIR)/scripts/rules.mk TARGET =\ - $(BINDIR)/nm\ - $(BINDIR)/ar\ - $(BINDIR)/strip\ - $(BINDIR)/size\ - $(BINDIR)/ranlib\ - $(BINDIR)/objdump\ - $(BINDIR)/objcopy\ - $(BINDIR)/addr2line\ + $(BINDIR)/scc-nm\ + $(BINDIR)/scc-ar\ + $(BINDIR)/scc-strip\ + $(BINDIR)/scc-size\ + $(BINDIR)/scc-ranlib\ + $(BINDIR)/scc-objdump\ + $(BINDIR)/scc-objcopy\ + $(BINDIR)/scc-addr2line\ + $(BINDIR)/scc\ $(LIBEXEC)/scc/qbe\ all: $(TARGET) $(DIRS) @@ -33,28 +34,32 @@ qbe/obj/qbe: qbe $(LIBEXEC)/scc/qbe: qbe/obj/qbe cp qbe/obj/qbe $@ -$(BINDIR)/nm: nm.o $(LIBMACH) $(LIBSCC) +$(BINDIR)/scc: scc.sh + cp scc.sh $@ + chmod +x $@ + +$(BINDIR)/scc-nm: nm.o $(LIBMACH) $(LIBSCC) $(CC) $(PROJ_LDFLAGS) nm.o -lmach -lscc -o $@ -$(BINDIR)/strip: strip.o $(LIBMACH) $(LIBSCC) +$(BINDIR)/scc-strip: strip.o $(LIBMACH) $(LIBSCC) $(CC) $(PROJ_LDFLAGS) strip.o -lmach -lscc -o $@ -$(BINDIR)/size: size.o $(LIBMACH) $(LIBSCC) +$(BINDIR)/scc-size: size.o $(LIBMACH) $(LIBSCC) $(CC) $(PROJ_LDFLAGS) size.o -lmach -lscc -o $@ -$(BINDIR)/ranlib: ranlib.o $(DRIVER).o $(LIBMACH) $(LIBSCC) +$(BINDIR)/scc-ranlib: ranlib.o $(DRIVER).o $(LIBMACH) $(LIBSCC) $(CC) $(PROJ_LDFLAGS) ranlib.o $(DRIVER).o -lmach -lscc -o $@ -$(BINDIR)/objdump: objdump.o $(LIBMACH) +$(BINDIR)/scc-objdump: objdump.o $(LIBMACH) $(CC) $(PROJ_LDFLAGS) objdump.o -lmach -o $@ -$(BINDIR)/objcopy: objcopy.o $(LIBMACH) +$(BINDIR)/scc-objcopy: objcopy.o $(LIBMACH) $(CC) $(PROJ_LDFLAGS) objcopy.o -lmach -o $@ -$(BINDIR)/addr2line: addr2line.o $(LIBMACH) $(LIBSCC) +$(BINDIR)/scc-addr2line: addr2line.o $(LIBMACH) $(LIBSCC) $(CC) $(PROJ_LDFLAGS) addr2line.o -lmach -lscc -o $@ -$(BINDIR)/ar: ar.o $(DRIVER).o +$(BINDIR)/scc-ar: ar.o $(DRIVER).o $(CC) $(PROJ_LDFLAGS) ar.o $(DRIVER).o -o $@ clean: qbe/.git diff --git a/src/cmd/cc/posix/Makefile b/src/cmd/cc/posix/Makefile @@ -12,14 +12,14 @@ SYSLST =\ i386-sysv-linux-elf\ amd64-sysv-openbsd-elf\ -TARGETS = $(BINDIR)/cc $(BINDIR)/cpp +TARGETS = $(BINDIR)/scc-cc $(BINDIR)/scc-cpp all: $(TARGETS) -$(BINDIR)/cc: $(LIBSCC) cc.o +$(BINDIR)/scc-cc: $(LIBSCC) cc.o $(CC) $(PROJ_LDFLAGS) cc.o -lscc -o $@ -$(BINDIR)/cpp: cpp.sh +$(BINDIR)/scc-cpp: cpp.sh trap "rm -f $$$$.sh" 0 2 3;\ rm -f $@ ;\ sed "s%@PREFIX@%$(PREFIX)%" < cpp.sh > $$$$.sh && \ diff --git a/src/cmd/ld/Makefile b/src/cmd/ld/Makefile @@ -2,7 +2,7 @@ PROJECTDIR = ../../.. include $(PROJECTDIR)/scripts/rules.mk -TARGET = $(BINDIR)/ld +TARGET = $(BINDIR)/scc-ld OBJS =\ main.o\ diff --git a/src/cmd/scc.sh b/src/cmd/scc.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +root=`dirname $0`/.. +SCCPREFIX=$root + +export SCCPREFIX + +exec $root/bin/scc-cc $@ diff --git a/tests/ar/execute/0001-append.sh b/tests/ar/execute/0001-append.sh @@ -15,9 +15,9 @@ echo Second > file2 echo Third > file3 rm -f file.a -ar -qv file.a file1 file2 file3 +scc-ar -qv file.a file1 file2 file3 -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 @@ -27,7 +27,7 @@ EOF cmp $tmp1 $tmp2 -ar -p file.a > $tmp1 +scc-ar -p file.a > $tmp1 cat <<EOF > $tmp2 First diff --git a/tests/ar/execute/0002-append.sh b/tests/ar/execute/0002-append.sh @@ -15,10 +15,10 @@ echo Second > file2 echo Third > file3 rm -f file.a -ar -qv file.a file1 -ar -qv file.a file2 -ar -qv file.a file3 -ar -t file.a > $tmp1 +scc-ar -qv file.a file1 +scc-ar -qv file.a file2 +scc-ar -qv file.a file3 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 @@ -28,7 +28,7 @@ EOF cmp $tmp1 $tmp2 -ar -p file.a > $tmp1 +scc-ar -p file.a > $tmp1 cat <<EOF > $tmp2 First diff --git a/tests/ar/execute/0003-append.sh b/tests/ar/execute/0003-append.sh @@ -15,9 +15,9 @@ echo Second > file-2 echo Third > file-3 cp master.a file.a -ar -qv file.a file-1 file-2 file-3 +scc-ar -qv file.a file-1 file-2 file-3 -ar -t file.a file-1 file-2 file-3 > $tmp1 +scc-ar -t file.a file-1 file-2 file-3 > $tmp1 cat <<EOF > $tmp2 file-1 @@ -27,7 +27,7 @@ EOF cmp $tmp1 $tmp2 -ar -p file.a file-1 file-2 file-3 > $tmp1 +scc-ar -p file.a file-1 file-2 file-3 > $tmp1 cat <<EOF > $tmp2 First diff --git a/tests/ar/execute/0004-append.sh b/tests/ar/execute/0004-append.sh @@ -11,7 +11,7 @@ trap "rm -f file.a f1 f2 f3 $tmp1 $tmp2; exit" 0 2 3 #empty file list rm -f file.a -ar -qv file.a +scc-ar -qv file.a if ! test -f file.a then echo "ar -q didn't generated empty archive" >&2 diff --git a/tests/ar/execute/0005-append.sh b/tests/ar/execute/0005-append.sh @@ -11,7 +11,7 @@ trap "rm -f file.a f1 f2 f3 $tmp1 $tmp2; exit" 0 2 3 #empty file list rm -f file.a -if ar -qv file.a badfile.a +if scc-ar -qv file.a badfile.a then echo "ar -q failed to detect missed file" >&2 exit 1 diff --git a/tests/ar/execute/0006-append.sh b/tests/ar/execute/0006-append.sh @@ -11,4 +11,4 @@ trap "rm -f file.a f1 f2 f3 $tmp1 $tmp2; exit" 0 2 3 #empty file list rm -f file.a -ar -qv file.a file.a +scc-ar -qv file.a file.a diff --git a/tests/ar/execute/0007-delete.sh b/tests/ar/execute/0007-delete.sh @@ -10,9 +10,9 @@ trap "rm -f file.a; exit" 0 2 3 cp master.a file.a -ar -dv file.a file2 +scc-ar -dv file.a file2 -if ar -tv file.a file2 +if scc-ar -tv file.a file2 then echo file-2 was not deleted >&2 exit 1 diff --git a/tests/ar/execute/0008-delete.sh b/tests/ar/execute/0008-delete.sh @@ -10,9 +10,9 @@ trap "rm -f file.a; exit" 0 2 3 cp master.a file.a -ar -dv file.a file1 file2 +scc-ar -dv file.a file1 file2 -if ar -tv file.a file1 file2 +if scc-ar -tv file.a file1 file2 then echo file-1 or file-2 were not deleted >&2 exit 1 diff --git a/tests/ar/execute/0009-delete.sh b/tests/ar/execute/0009-delete.sh @@ -9,9 +9,9 @@ trap "rm -f file.a; exit" 0 2 3 #delete two members, 2nd and 3rd cp master.a file.a -ar -dv file.a file2 file3 +scc-ar -dv file.a file2 file3 -if ar -tv file.a file2 file3 +if scc-ar -tv file.a file2 file3 then echo file-2 file-3 were not deleted >&2 exit 1 diff --git a/tests/ar/execute/0010-delete.sh b/tests/ar/execute/0010-delete.sh @@ -9,15 +9,15 @@ trap "rm -f file.a; exit" 0 2 3 #remove all the members cp master.a file.a -ar -dv file.a file1 file2 file3 +scc-ar -dv file.a file1 file2 file3 -if ar -tv file.a file2 file3 +if scc-ar -tv file.a file2 file3 then echo file-1 file2 file were not deleted >&2 exit 1 fi -if test `ar -t file.a | wc -l` -ne 0 +if test `scc-ar -t file.a | wc -l` -ne 0 then echo file.a is not empty after deleting all the members >&2 exit 1 diff --git a/tests/ar/execute/0011-delete.sh b/tests/ar/execute/0011-delete.sh @@ -11,7 +11,7 @@ cp master.a file.a last=`ls -l file.a | awk '{print $6,$7,$8}'` -if ! ar -dv file.a +if ! scc-ar -dv file.a then echo ar returned with error when no members exit 1 diff --git a/tests/ar/execute/0012-delete.sh b/tests/ar/execute/0012-delete.sh @@ -10,9 +10,9 @@ trap "rm -f file.a; exit" 0 2 3 cp master.a file.a -ar -dv file.a file2 +scc-ar -dv file.a file2 -if ar -tv file.a file2 +if scc-ar -tv file.a file2 then echo file-2 was not deleted >&2 exit 1 @@ -24,9 +24,9 @@ fi cp master.a file.a -ar -dv file.a file1 file2 +scc-ar -dv file.a file1 file2 -if ar -tv file.a file1 file2 +if scc-ar -tv file.a file1 file2 then echo file-1 or file-2 were not deleted >&2 exit 1 @@ -37,9 +37,9 @@ fi #delete two members, 2nd and 3rd cp master.a file.a -ar -dv file.a file2 file3 +scc-ar -dv file.a file2 file3 -if ar -tv file.a file2 file3 +if scc-ar -tv file.a file2 file3 then echo file-2 file-3 were not deleted >&2 exit 1 @@ -49,15 +49,15 @@ fi #remove all the members cp master.a file.a -ar -dv file.a file1 file2 file3 +scc-ar -dv file.a file1 file2 file3 -if ar -tv file.a file2 file3 +if scc-ar -tv file.a file2 file3 then echo file-1 file2 file were not deleted >&2 exit 1 fi -if test `ar -t file.a | wc -l` -ne 0 +if test `scc-ar -t file.a | wc -l` -ne 0 then echo file.a is not empty after deleting all the members >&2 exit 1 @@ -71,7 +71,7 @@ cp master.a file.a last=`ls -l file.a | awk '{print $6,$7,$8}'` -if ! ar -dv file.a +if ! scc-ar -dv file.a then echo ar returned with error when no members exit 1 @@ -87,7 +87,7 @@ fi #delete not existing member cp master.a file.a -if ar -dv file.a badfile +if scc-ar -dv file.a badfile then echo ar returned ok deleting a not existing member >&2 exit 1 diff --git a/tests/ar/execute/0013-print.sh b/tests/ar/execute/0013-print.sh @@ -12,7 +12,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 cp master.a file.a -ar -p file.a file1 > $tmp1 +scc-ar -p file.a file1 > $tmp1 cat <<! > $tmp2 This is the first file, diff --git a/tests/ar/execute/0014-print.sh b/tests/ar/execute/0014-print.sh @@ -11,7 +11,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #print 3rd member cp master.a file.a -ar -p file.a file3 > $tmp1 +scc-ar -p file.a file3 > $tmp1 cat <<! > $tmp2 and at the end, this is the last file diff --git a/tests/ar/execute/0015-print.sh b/tests/ar/execute/0015-print.sh @@ -11,7 +11,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #print 2nd member with verbose cp master.a file.a -ar -pv file.a file2 >$tmp1 +scc-ar -pv file.a file2 >$tmp1 cat <<! > $tmp2 diff --git a/tests/ar/execute/0016-print.sh b/tests/ar/execute/0016-print.sh @@ -11,7 +11,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #print all members cp master.a file.a -ar -p file.a file1 file2 file3 >$tmp1 +scc-ar -p file.a file1 file2 file3 >$tmp1 cat <<! > $tmp2 This is the first file, diff --git a/tests/ar/execute/0017-print.sh b/tests/ar/execute/0017-print.sh @@ -10,7 +10,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #and now with no members in command line cp master.a file.a -ar -p file.a > $tmp1 +scc-ar -p file.a > $tmp1 cat <<! > $tmp2 This is the first file, diff --git a/tests/ar/execute/0018-list.sh b/tests/ar/execute/0018-list.sh @@ -12,7 +12,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 cp master.a file.a -ar -t file.a file1 > $tmp1 +scc-ar -t file.a file1 > $tmp1 cat <<! > $tmp2 file1 diff --git a/tests/ar/execute/0019-list.sh b/tests/ar/execute/0019-list.sh @@ -11,7 +11,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #print 3rd member cp master.a file.a -ar -t file.a file3 > $tmp1 +scc-ar -t file.a file3 > $tmp1 cat <<! > $tmp2 file3 diff --git a/tests/ar/execute/0020-list.sh b/tests/ar/execute/0020-list.sh @@ -11,7 +11,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #print 2nd member with verbose cp master.a file.a -ar -tv file.a file2 >$tmp1 +scc-ar -tv file.a file2 >$tmp1 cat <<! > $tmp2 rw-r--r-- `id -u`/`id -g` Tue Jan 1 00:00:00 1980 file2 diff --git a/tests/ar/execute/0021-list.sh b/tests/ar/execute/0021-list.sh @@ -11,7 +11,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 #print all members cp master.a file.a -ar -t file.a file1 file2 file3 >$tmp1 +scc-ar -t file.a file1 file2 file3 >$tmp1 cat <<! > $tmp2 file1 diff --git a/tests/ar/execute/0022-list.sh b/tests/ar/execute/0022-list.sh @@ -12,7 +12,7 @@ trap "rm -f file.a $tmp1 $tmp2; exit" 0 2 3 cp master.a file.a -ar -t file.a file1 > $tmp1 +scc-ar -t file.a file1 > $tmp1 cat <<! > $tmp2 file1 @@ -23,7 +23,7 @@ cmp $tmp1 $tmp2 ############################################################################ #print 3rd member -ar -t file.a file3 > $tmp1 +scc-ar -t file.a file3 > $tmp1 cat <<! > $tmp2 file3 @@ -34,7 +34,7 @@ cmp $tmp1 $tmp2 ############################################################################ #print 2nd member with verbose -ar -tv file.a file2 >$tmp1 +scc-ar -tv file.a file2 >$tmp1 cat <<! > $tmp2 rw-r--r-- `id -u`/`id -g` Tue Jan 1 00:00:00 1980 file2 @@ -45,7 +45,7 @@ cmp $tmp1 $tmp2 ############################################################################ #print all members -ar -t file.a file1 file2 file3 >$tmp1 +scc-ar -t file.a file1 file2 file3 >$tmp1 cat <<! > $tmp2 file1 @@ -57,6 +57,6 @@ cmp $tmp1 $tmp2 #and now with no members in command line -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cmp $tmp1 $tmp2 diff --git a/tests/ar/execute/0023-extract.sh b/tests/ar/execute/0023-extract.sh @@ -11,7 +11,7 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #extract 1st member cp master.a file.a -ar -xv file.a file1 +scc-ar -xv file.a file1 cat <<EOF > $tmp1 This is the first file, diff --git a/tests/ar/execute/0024-extract.sh b/tests/ar/execute/0024-extract.sh @@ -11,7 +11,7 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #extract 3rd member cp master.a file.a -ar -xv file.a file3 +scc-ar -xv file.a file3 cat <<EOF > $tmp1 and at the end, this is the last file diff --git a/tests/ar/execute/0025-extract.sh b/tests/ar/execute/0025-extract.sh @@ -11,7 +11,7 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #extract 3rd member cp master.a file.a -ar -xv file.a file3 +scc-ar -xv file.a file3 cat <<EOF > $tmp1 and at the end, this is the last file diff --git a/tests/ar/execute/0026-extract.sh b/tests/ar/execute/0026-extract.sh @@ -11,7 +11,7 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #extract all members cp master.a file.a -ar -xv file.a file1 file2 file3 +scc-ar -xv file.a file1 file2 file3 cat <<EOF > $tmp1 This is the first file, diff --git a/tests/ar/execute/0027-extract.sh b/tests/ar/execute/0027-extract.sh @@ -11,7 +11,7 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #extract without parameters cp master.a file.a -ar -xv file.a +scc-ar -xv file.a cat <<EOF > $tmp1 This is the first file, diff --git a/tests/ar/execute/0029-move.sh b/tests/ar/execute/0029-move.sh @@ -11,8 +11,8 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #move 1st without specifier cp master.a file.a -ar -mv file.a file1 -ar -t file.a > $tmp1 +scc-ar -mv file.a file1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file2 diff --git a/tests/ar/execute/0030-move.sh b/tests/ar/execute/0030-move.sh @@ -11,8 +11,8 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #move 1st at the end cp master.a file.a -ar -mv -a file3 file.a file1 -ar -t file.a > $tmp1 +scc-ar -mv -a file3 file.a file1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file2 diff --git a/tests/ar/execute/0031-move.sh b/tests/ar/execute/0031-move.sh @@ -11,8 +11,8 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #and now, test without parameters cp master.a file.a -ar -mv file.a -ar -t file.a > $tmp1 +scc-ar -mv file.a +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 diff --git a/tests/ar/execute/0032-update.sh b/tests/ar/execute/0032-update.sh @@ -13,9 +13,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 echo First > file1 cp master.a file.a -ar -rv file.a file1 +scc-ar -rv file.a file1 -ar -p file.a file1 > $tmp1 +scc-ar -p file.a file1 > $tmp1 cat <<EOF > $tmp2 First diff --git a/tests/ar/execute/0033-update.sh b/tests/ar/execute/0033-update.sh @@ -13,9 +13,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 echo First > file-1 cp master.a file.a -ar -rv file.a file-1 +scc-ar -rv file.a file-1 -ar -p file.a file-1 > $tmp1 +scc-ar -p file.a file-1 > $tmp1 cat <<EOF > $tmp2 First diff --git a/tests/ar/execute/0034-update.sh b/tests/ar/execute/0034-update.sh @@ -13,9 +13,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 echo First > file1 cp master.a file.a -ar -rv -a file1 file.a file1 +scc-ar -rv -a file1 file.a file1 -ar -p file.a file1 > $tmp1 +scc-ar -p file.a file1 > $tmp1 cat <<EOF > $tmp2 First @@ -23,7 +23,7 @@ EOF cmp $tmp1 $tmp2 -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 diff --git a/tests/ar/execute/0035-update.sh b/tests/ar/execute/0035-update.sh @@ -13,9 +13,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 echo First > file1 cp master.a file.a -ar -rv -b file1 file.a file1 +scc-ar -rv -b file1 file.a file1 -ar -p file.a file1 > $tmp1 +scc-ar -p file.a file1 > $tmp1 cat <<EOF > $tmp2 First @@ -23,7 +23,7 @@ EOF cmp $tmp1 $tmp2 -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 diff --git a/tests/ar/execute/0036-update.sh b/tests/ar/execute/0036-update.sh @@ -13,9 +13,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 echo First > file-1 cp master.a file.a -ar -rv -b file1 file.a file-1 +scc-ar -rv -b file1 file.a file-1 -ar -p file.a file-1 > $tmp1 +scc-ar -p file.a file-1 > $tmp1 cat <<EOF > $tmp2 First @@ -23,7 +23,7 @@ EOF cmp $tmp1 $tmp2 -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file-1 diff --git a/tests/ar/execute/0037-update.sh b/tests/ar/execute/0037-update.sh @@ -13,9 +13,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 echo First > file-1 cp master.a file.a -ar -rv -a file1 file.a file-1 +scc-ar -rv -a file1 file.a file-1 -ar -p file.a file-1 > $tmp1 +scc-ar -p file.a file-1 > $tmp1 cat <<EOF > $tmp2 First @@ -23,7 +23,7 @@ EOF cmp $tmp1 $tmp2 -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 diff --git a/tests/ar/execute/0038-update.sh b/tests/ar/execute/0038-update.sh @@ -11,9 +11,9 @@ trap "rm -f file* $tmp1 $tmp2; exit" 0 2 3 #Update without parameters cp master.a file.a -ar -rv file.a +scc-ar -rv file.a -ar -t file.a > $tmp1 +scc-ar -t file.a > $tmp1 cat <<EOF > $tmp2 file1 diff --git a/tests/ar/execute/0039-update.sh b/tests/ar/execute/0039-update.sh @@ -15,9 +15,9 @@ echo First > file1 cp master.a file.a sleep 1 touch file1 -ar -ruv file.a file1 +scc-ar -ruv file.a file1 -ar -p file.a file1 > $tmp1 +scc-ar -p file.a file1 > $tmp1 cat <<EOF > $tmp2 First @@ -27,9 +27,9 @@ cmp $tmp1 $tmp2 echo Second > file1 touch -t 197001010000 file.1 -ar -ruv file.a file1 +scc-ar -ruv file.a file1 -ar -p file.a file1 > $tmp1 +scc-ar -p file.a file1 > $tmp1 cat <<EOF > $tmp2 First diff --git a/tests/cc/error/Makefile b/tests/cc/error/Makefile @@ -2,7 +2,7 @@ ROOT=../../.. SCCPREFIX=$(ROOT) -CC=$(ROOT)/bin/cc +CC=$(ROOT)/bin/scc-cc all: tests diff --git a/tests/cc/execute/Makefile b/tests/cc/execute/Makefile @@ -2,7 +2,7 @@ ROOT=../../.. SCCPREFIX=$(ROOT) -CC=$(ROOT)/bin/cc +CC=$(ROOT)/bin/scc-cc all: tests diff --git a/tests/ld/execute/Makefile b/tests/ld/execute/Makefile @@ -1,8 +1,8 @@ AS = z80-unknown-coff-as -AR = ../../../bin/ar -LD = ../../../bin/ld -RL = ../../../bin/ranlib -SZ = ../../../bin/size +AR = ../../../bin/scc-ar +LD = ../../../bin/scc-ld +RL = ../../../bin/scc-ranlib +SZ = ../../../bin/scc-size OBJS = f1.o f2.o OBJLIB = f3.o diff --git a/tests/nm/execute/0001-z80.sh b/tests/nm/execute/0001-z80.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm z80.out > $tmp1 +scc-nm z80.out > $tmp1 cat <<! > $tmp2 0000000000000000 b .bss diff --git a/tests/nm/execute/0002-z80-u.sh b/tests/nm/execute/0002-z80-u.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -u z80.out > $tmp1 +scc-nm -u z80.out > $tmp1 cat <<! > $tmp2 U text6 diff --git a/tests/nm/execute/0003-z80-g.sh b/tests/nm/execute/0003-z80-g.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -g z80.out > $tmp1 +scc-nm -g z80.out > $tmp1 cat <<! > $tmp2 0000000000000001 B averylongbss diff --git a/tests/nm/execute/0004-z80-v.sh b/tests/nm/execute/0004-z80-v.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -v z80.out > $tmp1 +scc-nm -v z80.out > $tmp1 cat <<! > $tmp2 U text6 diff --git a/tests/nm/execute/0005-z80-A.sh b/tests/nm/execute/0005-z80-A.sh @@ -7,10 +7,10 @@ tmp2=`mktemp` trap "rm -f f.out f.a $tmp1 $tmp2; exit" 0 2 3 rm -f f.a -ar -qv f.a z80.out +scc-ar -qv f.a z80.out cp z80.out f.out -ar -qv f.a f.out -nm -A f.a z80.out > $tmp1 +scc-ar -qv f.a f.out +scc-nm -A f.a z80.out > $tmp1 cat <<! > $tmp2 f.a[z80.out]: 0000000000000000 b .bss diff --git a/tests/nm/execute/0006-z80-o.sh b/tests/nm/execute/0006-z80-o.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -t o z80.out > $tmp1 +scc-nm -t o z80.out > $tmp1 cat <<! > $tmp2 0000000000000000 b .bss diff --git a/tests/nm/execute/0007-z80-d.sh b/tests/nm/execute/0007-z80-d.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -t d z80.out > $tmp1 +scc-nm -t d z80.out > $tmp1 cat <<! > $tmp2 0000000000000000 b .bss diff --git a/tests/nm/execute/0008-z80-x.sh b/tests/nm/execute/0008-z80-x.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -t x z80.out > $tmp1 +scc-nm -t x z80.out > $tmp1 cat <<! > $tmp2 0000000000000000 b .bss diff --git a/tests/nm/execute/0009-z80-P-o.sh b/tests/nm/execute/0009-z80-P-o.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -P -t o z80.out > $tmp1 +scc-nm -P -t o z80.out > $tmp1 cat <<! > $tmp2 .bss b 0000000000000000 0 diff --git a/tests/nm/execute/0010-z80-P-d.sh b/tests/nm/execute/0010-z80-P-d.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -P -t x z80.out > $tmp1 +scc-nm -P -t x z80.out > $tmp1 cat <<! > $tmp2 .bss b 0000000000000000 0 diff --git a/tests/nm/execute/0011-z80-P-x.sh b/tests/nm/execute/0011-z80-P-x.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -P -t x z80.out > $tmp1 +scc-nm -P -t x z80.out > $tmp1 cat <<! > $tmp2 .bss b 0000000000000000 0 diff --git a/tests/nm/execute/0012-z80-f.sh b/tests/nm/execute/0012-z80-f.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -f z80.out > $tmp1 +scc-nm -f z80.out > $tmp1 cat <<! > $tmp2 0000000000000000 b .bss diff --git a/tests/nm/execute/0013-z80-a.sh b/tests/nm/execute/0013-z80-a.sh @@ -6,7 +6,7 @@ tmp1=`mktemp` tmp2=`mktemp` trap "rm -f $tmp1 $tmp2; exit" 0 2 3 -nm -a z80.out > $tmp1 +scc-nm -a z80.out > $tmp1 cat <<! > $tmp2 0000000000000000 b .bss diff --git a/tests/size/execute/0001-z80.sh b/tests/size/execute/0001-z80.sh @@ -6,7 +6,7 @@ trap 'rm -f $tmp1 $tmp2' EXIT HUP INT QUIT TERM tmp1=`mktemp` tmp2=`mktemp` -size z80.out >$tmp1 +scc-size z80.out >$tmp1 cat > $tmp2 <<EOF text data bss dec hex filename diff --git a/tests/size/execute/0002-z80-t.sh b/tests/size/execute/0002-z80-t.sh @@ -6,7 +6,7 @@ trap 'rm -f $tmp1 $tmp2' EXIT HUP INT QUIT TERM tmp1=`mktemp` tmp2=`mktemp` -size -t z80.out z80.out>$tmp1 +scc-size -t z80.out z80.out>$tmp1 cat > $tmp2 <<EOF text data bss dec hex filename diff --git a/tests/strip/execute/0001-z80.sh b/tests/strip/execute/0001-z80.sh @@ -8,7 +8,7 @@ tmp2=tmpfile2 tmp3=tmpfile3 cp z80.out $tmp1 -strip $tmp1 > $tmp2 +scc-strip $tmp1 > $tmp2 z80-unknown-coff-nm $tmp1 >> $tmp2 2>&1 || true cat > $tmp3 <<EOF