- The compiler should not use these - However tccrun.c & libtcc1.a files should use these Also: - use s1->loaded_dlls for loaded dlls instead of dlopens - alpine musl: fully supported now and tested - ./configure ... --config-backtrace=no : disable backtraces --config-bcheck=no : disable bcheck - tests:dlltest: enable by default - tccrun.c : simplify mmaps - __builtin_alloca : always use asm-alias (instead of #define) - tccpe.c : use write32le
Showing the changes to tests (2 of 13 files). Show all
Unified · Split
| @@ -23,29 +23,13 @@ TESTS = \ · 22 unmodified lines | |||
| 23 | tests2-dir \ | 23 | tests2-dir \ |
| 24 | pp-dir | 24 | pp-dir |
| 25 | 25 | ||
| 26 | BTESTS = btest test1b | ||
| 27 | # test4_static -- Not all relocation types are implemented yet. | 26 | # test4_static -- Not all relocation types are implemented yet. |
| 28 | # asmtest / asmtest2 -- minor differences with gcc | 27 | # asmtest / asmtest2 -- minor differences with gcc |
| 29 | 28 | ||
| 30 | # bounds-checking is supported on i386 and x86_64 on linux and windows | 29 | ifneq ($(CONFIG_bcheck),no) |
| 31 | ifeq (-$(CONFIG_musl)-, --) | 30 | TESTS += btest test1b |
| 32 | ifeq ($(ARCH),i386) | ||
| 33 | TESTS += $(BTESTS) | ||
| 34 | endif | ||
| 35 | ifeq ($(ARCH),x86_64) | ||
| 36 | TESTS += $(BTESTS) | ||
| 37 | endif | ||
| 38 | ifeq ($(ARCH),arm) | ||
| 39 | TESTS += $(BTESTS) | ||
| 40 | endif | ||
| 41 | ifeq ($(ARCH),arm64) | ||
| 42 | TESTS += $(BTESTS) | ||
| 43 | endif | ||
| 44 | ifeq ($(ARCH),riscv64) | ||
| 45 | TESTS += $(BTESTS) | ||
| 46 | endif | 31 | endif |
| 47 | endif | 32 | ifeq ($(CONFIG_dll),no) |
| 48 | ifdef CONFIG_OSX # some don't work yet | ||
| 49 | TESTS := $(filter-out dlltest, $(TESTS)) | 33 | TESTS := $(filter-out dlltest, $(TESTS)) |
| 50 | endif | 34 | endif |
| 51 | ifeq (,$(filter arm64 i386 x86_64,$(ARCH))) | 35 | ifeq (,$(filter arm64 i386 x86_64,$(ARCH))) |
| @@ -55,18 +39,14 @@ ifeq ($(CONFIG_arm_eabi),yes) · 3 unmodified lines | |||
| 55 | TESTS := $(filter-out test3,$(TESTS)) | 39 | TESTS := $(filter-out test3,$(TESTS)) |
| 56 | endif | 40 | endif |
| 57 | ifeq (,$(filter i386 x86_64,$(ARCH))) | 41 | ifeq (,$(filter i386 x86_64,$(ARCH))) |
| 58 | TESTS := $(filter-out dlltest asm-c-connect-test,$(TESTS)) | 42 | TESTS := $(filter-out asm-c-connect-test,$(TESTS)) |
| 59 | endif | 43 | endif |
| 60 | |||
| 61 | ifeq ($(OS),Windows_NT) # for libtcc_test to find libtcc.dll | 44 | ifeq ($(OS),Windows_NT) # for libtcc_test to find libtcc.dll |
| 62 | PATH := $(CURDIR)/$(TOP)$(if $(findstring ;,$(PATH)),;,:)$(PATH) | 45 | PATH := $(CURDIR)/$(TOP)$(if $(findstring ;,$(PATH)),;,:)$(PATH) |
| 63 | endif | 46 | endif |
| 64 | |||
| 65 | ifdef CONFIG_OSX | 47 | ifdef CONFIG_OSX |
| 66 | LIBS += $(LINK_LIBTCC) | 48 | LIBS += $(LINK_LIBTCC) |
| 67 | endif | 49 | endif |
| 68 | |||
| 69 | |||
| 70 | ifeq ($(ARCH),arm) | 50 | ifeq ($(ARCH),arm) |
| 71 | # tcctest refers to the alignment of functions, and with thumb mode | 51 | # tcctest refers to the alignment of functions, and with thumb mode |
| 72 | # the low bit of code addresses selects the mode, so the "alignment" | 52 | # the low bit of code addresses selects the mode, so the "alignment" |
| @@ -14,7 +14,6 @@ ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float · 13 unmodified lines | |||
| 14 | endif | 14 | endif |
| 15 | ifdef CONFIG_OSX | 15 | ifdef CONFIG_OSX |
| 16 | SKIP += 40_stdio.test 42_function_pointer.test | 16 | SKIP += 40_stdio.test 42_function_pointer.test |
| 17 | SKIP += 113_btdll.test # no shared lib support yet | ||
| 18 | endif | 17 | endif |
| 19 | ifeq ($(ARCH),x86_64) | 18 | ifeq ($(ARCH),x86_64) |
| 20 | SKIP += 73_arm64.test | 19 | SKIP += 73_arm64.test |
| @@ -24,16 +23,20 @@ ifeq (,$(filter i386,$(ARCH))) · 3 unmodified lines | |||
| 24 | endif | 23 | endif |
| 25 | ifeq (,$(filter i386 x86_64,$(ARCH))) | 24 | ifeq (,$(filter i386 x86_64,$(ARCH))) |
| 26 | SKIP += 85_asm-outside-function.test # x86 asm | 25 | SKIP += 85_asm-outside-function.test # x86 asm |
| 27 | SKIP += 113_btdll.test # dll support needed | ||
| 28 | endif | 26 | endif |
| 29 | ifeq (,$(filter i386 x86_64 arm arm64 riscv64,$(ARCH))) | 27 | ifeq ($(CONFIG_backtrace),no) |
| 30 | SKIP += 112_backtrace.test | 28 | SKIP += 112_backtrace.test |
| 29 | SKIP += 113_btdll.test | ||
| 30 | CONFIG_bcheck = no # no bcheck without backtrace | ||
| 31 | endif | ||
| 32 | ifeq ($(CONFIG_bcheck),no) | ||
| 31 | SKIP += 114_bound_signal.test | 33 | SKIP += 114_bound_signal.test |
| 32 | SKIP += 115_bound_setjmp.test | 34 | SKIP += 115_bound_setjmp.test |
| 33 | SKIP += 116_bound_setjmp2.test | 35 | SKIP += 116_bound_setjmp2.test |
| 36 | SKIP += 117_builtins.test | ||
| 34 | endif | 37 | endif |
| 35 | ifeq (-$(CONFIG_musl)-,-yes-) | 38 | ifeq ($(CONFIG_dll),no) |
| 36 | SKIP += 112_backtrace.test | 39 | SKIP += 113_btdll.test # no shared lib support yet |
| 37 | endif | 40 | endif |
| 38 | ifeq (-$(findstring gcc,$(CC))-,--) | 41 | ifeq (-$(findstring gcc,$(CC))-,--) |
| 39 | SKIP += $(patsubst %.expect,%.test,$(GEN-ALWAYS)) | 42 | SKIP += $(patsubst %.expect,%.test,$(GEN-ALWAYS)) |
| @@ -45,12 +48,6 @@ ifeq (-$(CONFIG_WIN32)-,-yes-) · 5 unmodified lines | |||
| 45 | SKIP += 106_pthread.test # No pthread support | 48 | SKIP += 106_pthread.test # No pthread support |
| 46 | SKIP += 114_bound_signal.test # No pthread support | 49 | SKIP += 114_bound_signal.test # No pthread support |
| 47 | endif | 50 | endif |
| 48 | ifeq ($(TARGETOS),OpenBSD) | ||
| 49 | SKIP += 106_pthread.test | ||
| 50 | SKIP += 113_btdll.test | ||
| 51 | SKIP += 114_bound_signal.test | ||
| 52 | SKIP += 116_bound_setjmp2.test | ||
| 53 | endif | ||
| 54 | 51 | ||
| 55 | # Some tests might need arguments | 52 | # Some tests might need arguments |
| 56 | ARGS = | 53 | ARGS = |
| @@ -109,8 +106,10 @@ GEN-ALWAYS = · 52 unmodified lines | |||
| 109 | 115_bound_setjmp.test: FLAGS += -b | 106 | 115_bound_setjmp.test: FLAGS += -b |
| 110 | 116_bound_setjmp2.test: FLAGS += -b | 107 | 116_bound_setjmp2.test: FLAGS += -b |
| 111 | 117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 ) | 108 | 117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 ) |
| 109 | ifneq ($(CONFIG_bcheck),no) | ||
| 112 | 121_struct_return.test: FLAGS += -b | 110 | 121_struct_return.test: FLAGS += -b |
| 113 | 122_vla_reuse.test: FLAGS += -b | 111 | 122_vla_reuse.test: FLAGS += -b |
| 112 | endif | ||
| 114 | 113 | ||
| 115 | # Filter source directory in warnings/errors (out-of-tree builds) | 114 | # Filter source directory in warnings/errors (out-of-tree builds) |
| 116 | FILTER = 2>&1 | sed -e 's,$(SRC)/,,g' | 115 | FILTER = 2>&1 | sed -e 's,$(SRC)/,,g' |