History

replace native platform macros in the compiler

- 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

grischka committed 5 years ago

Commit e2e62fc1 parent 02f61d513 files · +163 −202Browse files

Showing the changes to tests (2 of 13 files). Show all

Unified · Split

2 files
  1. tests/Makefile +4 −24
  2. tests/tests2/Makefile +10 −11
tests/Makefile+4−24
@@ -23,29 +23,13 @@ TESTS = \ · 22 unmodified lines
23 tests2-dir \23 tests2-dir \
24 pp-dir24 pp-dir
25 25
26BTESTS = 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 gcc27# asmtest / asmtest2 -- minor differences with gcc
29 28
30# bounds-checking is supported on i386 and x86_64 on linux and windows29ifneq ($(CONFIG_bcheck),no)
31ifeq (-$(CONFIG_musl)-, --)30 TESTS += btest test1b
32ifeq ($(ARCH),i386)
33 TESTS += $(BTESTS)
34endif
35ifeq ($(ARCH),x86_64)
36 TESTS += $(BTESTS)
37endif
38ifeq ($(ARCH),arm)
39 TESTS += $(BTESTS)
40endif
41ifeq ($(ARCH),arm64)
42 TESTS += $(BTESTS)
43endif
44ifeq ($(ARCH),riscv64)
45 TESTS += $(BTESTS)
46endif31endif
47endif32ifeq ($(CONFIG_dll),no)
48ifdef CONFIG_OSX # some don't work yet
49 TESTS := $(filter-out dlltest, $(TESTS))33 TESTS := $(filter-out dlltest, $(TESTS))
50endif34endif
51ifeq (,$(filter arm64 i386 x86_64,$(ARCH)))35ifeq (,$(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))
56endif40endif
57ifeq (,$(filter i386 x86_64,$(ARCH)))41ifeq (,$(filter i386 x86_64,$(ARCH)))
58 TESTS := $(filter-out dlltest asm-c-connect-test,$(TESTS))42 TESTS := $(filter-out asm-c-connect-test,$(TESTS))
59endif43endif
60
61ifeq ($(OS),Windows_NT) # for libtcc_test to find libtcc.dll44ifeq ($(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)
63endif46endif
64
65ifdef CONFIG_OSX47ifdef CONFIG_OSX
66LIBS += $(LINK_LIBTCC)48LIBS += $(LINK_LIBTCC)
67endif49endif
68
69
70ifeq ($(ARCH),arm)50ifeq ($(ARCH),arm)
71# tcctest refers to the alignment of functions, and with thumb mode51# 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"
tests/tests2/Makefile+10−11
@@ -14,7 +14,6 @@ ifeq ($(CONFIG_arm_eabi),yes) # not ARM soft-float · 13 unmodified lines
14endif14endif
15ifdef CONFIG_OSX15ifdef CONFIG_OSX
16 SKIP += 40_stdio.test 42_function_pointer.test16 SKIP += 40_stdio.test 42_function_pointer.test
17 SKIP += 113_btdll.test # no shared lib support yet
18endif17endif
19ifeq ($(ARCH),x86_64)18ifeq ($(ARCH),x86_64)
20 SKIP += 73_arm64.test19 SKIP += 73_arm64.test
@@ -24,16 +23,20 @@ ifeq (,$(filter i386,$(ARCH))) · 3 unmodified lines
24endif23endif
25ifeq (,$(filter i386 x86_64,$(ARCH)))24ifeq (,$(filter i386 x86_64,$(ARCH)))
26 SKIP += 85_asm-outside-function.test # x86 asm25 SKIP += 85_asm-outside-function.test # x86 asm
27 SKIP += 113_btdll.test # dll support needed
28endif26endif
29ifeq (,$(filter i386 x86_64 arm arm64 riscv64,$(ARCH)))27ifeq ($(CONFIG_backtrace),no)
30 SKIP += 112_backtrace.test28 SKIP += 112_backtrace.test
29 SKIP += 113_btdll.test
30 CONFIG_bcheck = no # no bcheck without backtrace
31endif
32ifeq ($(CONFIG_bcheck),no)
31 SKIP += 114_bound_signal.test33 SKIP += 114_bound_signal.test
32 SKIP += 115_bound_setjmp.test34 SKIP += 115_bound_setjmp.test
33 SKIP += 116_bound_setjmp2.test35 SKIP += 116_bound_setjmp2.test
36 SKIP += 117_builtins.test
34endif37endif
35ifeq (-$(CONFIG_musl)-,-yes-)38ifeq ($(CONFIG_dll),no)
36 SKIP += 112_backtrace.test39 SKIP += 113_btdll.test # no shared lib support yet
37endif40endif
38ifeq (-$(findstring gcc,$(CC))-,--)41ifeq (-$(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 support48 SKIP += 106_pthread.test # No pthread support
46 SKIP += 114_bound_signal.test # No pthread support49 SKIP += 114_bound_signal.test # No pthread support
47endif50endif
48ifeq ($(TARGETOS),OpenBSD)
49 SKIP += 106_pthread.test
50 SKIP += 113_btdll.test
51 SKIP += 114_bound_signal.test
52 SKIP += 116_bound_setjmp2.test
53endif
54 51
55# Some tests might need arguments52# Some tests might need arguments
56ARGS =53ARGS =
@@ -109,8 +106,10 @@ GEN-ALWAYS = · 52 unmodified lines
109115_bound_setjmp.test: FLAGS += -b106115_bound_setjmp.test: FLAGS += -b
110116_bound_setjmp2.test: FLAGS += -b107116_bound_setjmp2.test: FLAGS += -b
111117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )108117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )
109ifneq ($(CONFIG_bcheck),no)
112121_struct_return.test: FLAGS += -b110121_struct_return.test: FLAGS += -b
113122_vla_reuse.test: FLAGS += -b111122_vla_reuse.test: FLAGS += -b
112endif
114 113
115# Filter source directory in warnings/errors (out-of-tree builds)114# Filter source directory in warnings/errors (out-of-tree builds)
116FILTER = 2>&1 | sed -e 's,$(SRC)/,,g'115FILTER = 2>&1 | sed -e 's,$(SRC)/,,g'

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t