scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit 6dddad3a1bec1ed7609fdb4b135b43dd29b7bc06
parent 16b409964a0931c9487f2db7e61b6039f9265725
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sat, 30 Oct 2021 22:42:07 +0200

tests/libc: Enable use of external CC

After this change the invocation of make can modify
the value of CC and select scc or the cc wrapper script.
This can help to test scc using the scc c99 libc.

Diffstat:
Mtests/libc/execute/Makefile | 13++++---------
Mtests/libc/execute/chktest.sh | 2+-
2 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/tests/libc/execute/Makefile b/tests/libc/execute/Makefile @@ -1,19 +1,14 @@ .POSIX: -ROOT = ../../.. -CFLAGS = -CC = SCCPREFIX=$(ROOT) ./cc.sh +CC = ./cc.sh .c: $(CC) $(CFLAGS) -o $@ $< -all: tests-amd64 +all: tests -tests-i386: - @SCCPREFIX=$(ROOT) CFLAGS='-a i386' ./chktest.sh libc-tests.lst - -tests-amd64: - @SCCPREFIX=$(ROOT) CFLAGS='-a amd64' ./chktest.sh libc-tests.lst +tests: + @CC=$(CC) ./chktest.sh libc-tests.lst clean: rm -f *.o *core test.log `awk '{print $$1}' libc-tests.lst` diff --git a/tests/libc/execute/chktest.sh b/tests/libc/execute/chktest.sh @@ -13,7 +13,7 @@ do rm -f *.o $tmp1 $tmp2 (echo $i - ./cc.sh $CFLAGS -o $i $i.c + $CC $CFLAGS -o $i $i.c echo '/^output:$/+;/^end:$/-'w $tmp1 | ed -s $i.c ./$i > $tmp2 2>&1 diff -u $tmp1 $tmp2) >> test.log 2>&1 &&