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
2323 tests2-dir \
2424 pp-dir
2525
26−BTESTS = btest test1b
2726 # test4_static -- Not all relocation types are implemented yet.
2827 # asmtest / asmtest2 -- minor differences with gcc
2928
30−# bounds-checking is supported on i386 and x86_64 on linux and windows
31−ifeq (-$(CONFIG_musl)-, --)
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)
29+ifneq ($(CONFIG_bcheck),no)
30+ TESTS += btest test1b
4631 endif
47−endif
48−ifdef CONFIG_OSX # some don't work yet
32+ifeq ($(CONFIG_dll),no)
4933 TESTS := $(filter-out dlltest, $(TESTS))
5034 endif
5135 ifeq (,$(filter arm64 i386 x86_64,$(ARCH)))
@@ -55,18 +39,14 @@ ifeq ($(CONFIG_arm_eabi),yes) · 3 unmodified lines
5539 TESTS := $(filter-out test3,$(TESTS))
5640 endif
5741 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))
5943 endif
60−
6144 ifeq ($(OS),Windows_NT) # for libtcc_test to find libtcc.dll
6245 PATH := $(CURDIR)/$(TOP)$(if $(findstring ;,$(PATH)),;,:)$(PATH)
6346 endif
64−
6547 ifdef CONFIG_OSX
6648 LIBS += $(LINK_LIBTCC)
6749 endif
68−
69−
7050 ifeq ($(ARCH),arm)
7151 # tcctest refers to the alignment of functions, and with thumb mode
7252 # 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
1414 endif
1515 ifdef CONFIG_OSX
1616 SKIP += 40_stdio.test 42_function_pointer.test
17− SKIP += 113_btdll.test # no shared lib support yet
1817 endif
1918 ifeq ($(ARCH),x86_64)
2019 SKIP += 73_arm64.test
@@ -24,16 +23,20 @@ ifeq (,$(filter i386,$(ARCH))) · 3 unmodified lines
2423 endif
2524 ifeq (,$(filter i386 x86_64,$(ARCH)))
2625 SKIP += 85_asm-outside-function.test # x86 asm
27− SKIP += 113_btdll.test # dll support needed
2826 endif
29−ifeq (,$(filter i386 x86_64 arm arm64 riscv64,$(ARCH)))
27+ifeq ($(CONFIG_backtrace),no)
3028 SKIP += 112_backtrace.test
29+ SKIP += 113_btdll.test
30+ CONFIG_bcheck = no # no bcheck without backtrace
31+endif
32+ifeq ($(CONFIG_bcheck),no)
3133 SKIP += 114_bound_signal.test
3234 SKIP += 115_bound_setjmp.test
3335 SKIP += 116_bound_setjmp2.test
36+ SKIP += 117_builtins.test
3437 endif
35−ifeq (-$(CONFIG_musl)-,-yes-)
36− SKIP += 112_backtrace.test
38+ifeq ($(CONFIG_dll),no)
39+ SKIP += 113_btdll.test # no shared lib support yet
3740 endif
3841 ifeq (-$(findstring gcc,$(CC))-,--)
3942 SKIP += $(patsubst %.expect,%.test,$(GEN-ALWAYS))
@@ -45,12 +48,6 @@ ifeq (-$(CONFIG_WIN32)-,-yes-) · 5 unmodified lines
4548 SKIP += 106_pthread.test # No pthread support
4649 SKIP += 114_bound_signal.test # No pthread support
4750 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
5451
5552 # Some tests might need arguments
5653 ARGS =
@@ -109,8 +106,10 @@ GEN-ALWAYS = · 52 unmodified lines
109106 115_bound_setjmp.test: FLAGS += -b
110107 116_bound_setjmp2.test: FLAGS += -b
111108 117_builtins.test: T1 = ( $(TCC) -run $1 && $(TCC) -b -run $1 )
109+ifneq ($(CONFIG_bcheck),no)
112110 121_struct_return.test: FLAGS += -b
113111 122_vla_reuse.test: FLAGS += -b
112+endif
114113
115114 # Filter source directory in warnings/errors (out-of-tree builds)
116115 FILTER = 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