mirror of
https://github.com/mirror/tinycc.git
synced 2025-02-26 08:00:09 +08:00
Don't hardcode gcc in tests Makefile
This commit is contained in:
parent
62d1da1b3e
commit
d3d89900f6
2
.gitignore
vendored
2
.gitignore
vendored
@ -36,7 +36,7 @@ p2.c
|
|||||||
tcctest[1234]
|
tcctest[1234]
|
||||||
test[1234].out
|
test[1234].out
|
||||||
tests/tcclib.h
|
tests/tcclib.h
|
||||||
tests/tcctest.gcc
|
tests/tcctest.cc
|
||||||
tests/weaktest.*.o.txt
|
tests/weaktest.*.o.txt
|
||||||
tests/tests2/fred.txt
|
tests/tests2/fred.txt
|
||||||
tests/hello
|
tests/hello
|
||||||
|
@ -103,10 +103,10 @@ moretests:
|
|||||||
w32-prep:
|
w32-prep:
|
||||||
cp ../libtcc1.a ../lib
|
cp ../libtcc1.a ../lib
|
||||||
|
|
||||||
# test.ref - generate using gcc
|
# test.ref - generate using cc
|
||||||
test.ref: tcctest.c
|
test.ref: tcctest.c
|
||||||
gcc -o tcctest.gcc $< -I$(top_srcdir) $(CPPFLAGS) -w $(CFLAGS) $(NATIVE_DEFINES) -std=gnu99 -O0 -fno-omit-frame-pointer $(LDFLAGS)
|
$(CC) -o tcctest.cc $< -I$(top_srcdir) $(CPPFLAGS) -w $(CFLAGS) $(NATIVE_DEFINES) -std=gnu99 -O0 -fno-omit-frame-pointer $(LDFLAGS)
|
||||||
./tcctest.gcc > $@
|
./tcctest.cc > $@
|
||||||
|
|
||||||
# auto test
|
# auto test
|
||||||
test1 test1b: tcctest.c test.ref
|
test1 test1b: tcctest.c test.ref
|
||||||
@ -183,10 +183,10 @@ speedtest: ex2 ex3
|
|||||||
|
|
||||||
weaktest: tcctest.c test.ref
|
weaktest: tcctest.c test.ref
|
||||||
$(TCC) -c $< -o weaktest.tcc.o $(CPPFLAGS) $(CFLAGS)
|
$(TCC) -c $< -o weaktest.tcc.o $(CPPFLAGS) $(CFLAGS)
|
||||||
$(CC) -c $< -o weaktest.gcc.o -I. $(CPPFLAGS) -w $(CFLAGS)
|
$(CC) -c $< -o weaktest.cc.o -I. $(CPPFLAGS) -w $(CFLAGS)
|
||||||
objdump -t weaktest.tcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.tcc.o.txt
|
objdump -t weaktest.tcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.tcc.o.txt
|
||||||
objdump -t weaktest.gcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.gcc.o.txt
|
objdump -t weaktest.cc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.cc.o.txt
|
||||||
diff weaktest.gcc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK"
|
diff weaktest.cc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK"
|
||||||
|
|
||||||
ex%: $(top_srcdir)/examples/ex%.c
|
ex%: $(top_srcdir)/examples/ex%.c
|
||||||
$(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
$(CC) -o $@ $< $(CPPFLAGS) $(CFLAGS) $(LDFLAGS)
|
||||||
@ -239,6 +239,6 @@ cache: tcc_g
|
|||||||
# clean
|
# clean
|
||||||
clean:
|
clean:
|
||||||
$(MAKE) -C tests2 $@
|
$(MAKE) -C tests2 $@
|
||||||
rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.gcc *.exe \
|
rm -vf *~ *.o *.a *.bin *.i *.ref *.out *.out? *.out?b *.cc *.exe \
|
||||||
hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \
|
hello libtcc_test tcctest[1234] ex? tcc_g tcclib.h \
|
||||||
../lib/libtcc1.a
|
../lib/libtcc1.a
|
||||||
|
Loading…
Reference in New Issue
Block a user