| @@ -13,6 +13,7 @@ TESTS = \ · 12 unmodified lines |
| 13 | hello-run \ | 13 | hello-run \ |
| 14 | libtest \ | 14 | libtest \ |
| 15 | test3 \ | 15 | test3 \ |
| | 16 | dlltest \ |
| 16 | abitest \ | 17 | abitest \ |
| 17 | vla_test-run \ | 18 | vla_test-run \ |
| 18 | tests2-dir \ | 19 | tests2-dir \ |
| @@ -40,6 +41,9 @@ endif · 21 unmodified lines |
| 40 | ifeq ($(CONFIG_arm_eabi),yes) | 41 | ifeq ($(CONFIG_arm_eabi),yes) |
| 41 | TESTS := $(filter-out test3,$(TESTS)) | 42 | TESTS := $(filter-out test3,$(TESTS)) |
| 42 | endif | 43 | endif |
| | 44 | ifeq (,$(filter i386 x86-64,$(ARCH))) |
| | 45 | TESTS := $(filter-out dlltest,$(TESTS)) |
| | 46 | endif |
| 43 | | 47 | |
| 44 | # run local version of tcc with local libraries and includes | 48 | # run local version of tcc with local libraries and includes |
| 45 | TCCFLAGS = -B$(TOP) -I$(TOPSRC)/include -I$(TOPSRC) -I$(TOP) | 49 | TCCFLAGS = -B$(TOP) -I$(TOPSRC)/include -I$(TOPSRC) -I$(TOP) |
| @@ -126,6 +130,22 @@ test4: tcctest.c test.ref · 80 unmodified lines |
| 126 | ./tcctest2 > test2.out | 130 | ./tcctest2 > test2.out |
| 127 | @if diff -u test.ref test2.out ; then echo "Static Auto Test OK"; fi | 131 | @if diff -u test.ref test2.out ; then echo "Static Auto Test OK"; fi |
| 128 | | 132 | |
| | 133 | # use tcc to create libtcc.so/.dll and the tcc(.exe) frontend and run them |
| | 134 | dlltest: |
| | 135 | @echo ------------ $@ ------------ |
| | 136 | $(TCC) -DONE_SOURCE $(NATIVE_DEFINES) -DLIBTCC_AS_DLL ../libtcc.c $(LIBS) -shared -o libtcc2$(DLLSUF) |
| | 137 | $(TCC) $(NATIVE_DEFINES) ../tcc.c libtcc2$(DLLSUF) $(LIBS) -Wl,-rpath=. -o tcc2$(EXESUF) |
| | 138 | ./tcc2$(EXESUF) $(TCCFLAGS) $(RUN_TCC) -run ../examples/ex1.c |
| | 139 | ifndef CONFIG_WIN32 |
| | 140 | @echo ------------ $@ with PIC ------------ |
| | 141 | $(CC) $(CFLAGS) -fPIC -DONE_SOURCE $(NATIVE_DEFINES) -DLIBTCC_AS_DLL -c ../libtcc.c |
| | 142 | $(TCC) libtcc.o $(LIBS) -shared -o libtcc2$(DLLSUF) |
| | 143 | $(TCC) $(NATIVE_DEFINES) ../tcc.c libtcc2$(DLLSUF) $(LIBS) -Wl,-rpath=. -o tcc2$(EXESUF) |
| | 144 | ./tcc2$(EXESUF) $(TCCFLAGS) $(RUN_TCC) -run ../examples/ex1.c |
| | 145 | endif |
| | 146 | @rm tcc2$(EXESUF) libtcc2$(DLLSUF) |
| | 147 | |
| | 148 | |
| 129 | # memory and bound check auto test | 149 | # memory and bound check auto test |
| 130 | BOUNDS_OK = 1 4 8 10 14 | 150 | BOUNDS_OK = 1 4 8 10 14 |
| 131 | BOUNDS_FAIL= 2 5 7 9 11 12 13 15 | 151 | BOUNDS_FAIL= 2 5 7 9 11 12 13 15 |