diff options
| author | Joe Soroka <gits@joesoroka.com> | 2011-02-01 09:41:03 -0800 |
|---|---|---|
| committer | Joe Soroka <gits@joesoroka.com> | 2011-02-01 09:41:03 -0800 |
| commit | cf08675702044c180553c866ba1fde0414f00590 (patch) | |
| tree | 8f9938bcc18b868912f173bcd4f6c125da1e2548 /tests/Makefile | |
| parent | c59d3426b8060bcba3945f1388763512412a5d4d (diff) | |
| download | tinycc-cf08675702044c180553c866ba1fde0414f00590.tar.gz tinycc-cf08675702044c180553c866ba1fde0414f00590.tar.bz2 | |
weak definitions overrule non-weak prototypes
Diffstat (limited to 'tests/Makefile')
| -rw-r--r-- | tests/Makefile | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/Makefile b/tests/Makefile index 017f35c..4bebc2b 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -6,7 +6,7 @@ TESTS = libtest test3 # these should work too -# TESTS += test1 test2 speedtest btest +# TESTS += test1 test2 speedtest btest weaktest # these don't work as they should # TESTS += test4 asmtest @@ -26,7 +26,7 @@ DISAS=objdump -d all test : $(TESTS) # make sure that tcc exists -test1 test2 test3 test4 btest speedtest asmtest : ../tcc +test1 test2 test3 test4 btest speedtest asmtest weaktest : ../tcc ../%: $(MAKE) -C .. $* @@ -116,6 +116,13 @@ speedtest: ex2 ex3 time ./ex3 35 time $(TCC) -run ../examples/ex3.c 35 +weaktest: test.ref + $(TCC) -c tcctest.c -o weaktest.tcc.o + $(CC) -c tcctest.c -o weaktest.gcc.o -I. -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.gcc.o | grep ' w ' | sed -e 's/.* \([a-zA-Z0-9_]*\)$$/\1/' | LC_ALL=C sort > weaktest.gcc.o.txt + diff weaktest.gcc.o.txt weaktest.tcc.o.txt && echo "Weak Auto Test OK" + ex%: ../examples/ex%.c $(CC) -o $@ $< $(CFLAGS) |
