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 lib (2 of 13 files). Show all

Unified · Split

2 files
  1. lib/Makefile +7 −7
  2. lib/bcheck.c +4 −1
lib/Makefile+7−7
@@ -30,17 +30,17 @@ ifeq "$($(T)-libtcc1-usegcc)" "yes" · 29 unmodified lines
30 XFLAGS = $(CFLAGS) -fPIC -gstabs -fno-omit-frame-pointer -Wno-unused-function -Wno-unused-variable30 XFLAGS = $(CFLAGS) -fPIC -gstabs -fno-omit-frame-pointer -Wno-unused-function -Wno-unused-variable
31endif31endif
32 32
33ifneq ($(CONFIG_backtrace),no)
33# only for native compiler34# only for native compiler
35ifneq ($(CONFIG_bcheck),no)
34$(X)BCHECK_O = bcheck.o36$(X)BCHECK_O = bcheck.o
37endif
35$(X)BT_O = bt-exe.o bt-log.o38$(X)BT_O = bt-exe.o bt-log.o
36$(X)B_O = bcheck.o bt-exe.o bt-log.o bt-dll.o39$(X)B_O = $(BCHECK_O) bt-exe.o bt-log.o bt-dll.o
37
38ifeq ($(CONFIG_musl)$(CONFIG_uClibc),yes)
39 BCHECK_O =
40else
41 DSO_O = dsohandle.o
42endif40endif
43 41
42DSO_O = dsohandle.o
43
44I386_O = libtcc1.o alloca86.o alloca86-bt.o $(BT_O)44I386_O = libtcc1.o alloca86.o alloca86-bt.o $(BT_O)
45X86_64_O = libtcc1.o alloca86_64.o alloca86_64-bt.o $(BT_O)45X86_64_O = libtcc1.o alloca86_64.o alloca86_64-bt.o $(BT_O)
46ARM_O = libtcc1.o armeabi.o alloca-arm.o armflush.o fetch_and_add_arm.o $(BT_O)46ARM_O = libtcc1.o armeabi.o alloca-arm.o armflush.o fetch_and_add_arm.o $(BT_O)
@@ -82,7 +82,7 @@ $(X)%.o : %.S · 35 unmodified lines
82$(TOP)/%.o : %.c82$(TOP)/%.o : %.c
83 $S$(XCC) -c $< -o $@ $(XFLAGS)83 $S$(XCC) -c $< -o $@ $(XFLAGS)
84 84
85$(TOP)/bcheck.o : XFLAGS += -g85$(TOP)/bcheck.o : XFLAGS += -g $(if (CONFIG_musl),-DTCC_MUSL)
86$(TOP)/bt-exe.o : $(TOP)/tccrun.c86$(TOP)/bt-exe.o : $(TOP)/tccrun.c
87 87
88$(X)crt1w.o : crt1.c88$(X)crt1w.o : crt1.c
lib/bcheck.c+4−1
@@ -161,6 +161,9 @@ static pthread_spinlock_t bounds_spin; · 160 unmodified lines
161#define HAVE_TLS_FUNC (1)161#define HAVE_TLS_FUNC (1)
162#define HAVE_TLS_VAR (0)162#define HAVE_TLS_VAR (0)
163#endif163#endif
164#ifdef TCC_MUSL
165# undef HAVE_CTYPE
166#endif
164#endif167#endif
165 168
166#if MALLOC_REDIR169#if MALLOC_REDIR
@@ -1150,7 +1153,7 @@ void __attribute__((destructor)) __bound_exit(void) · 983 unmodified lines
1150 dprintf(stderr, "%s, %s():\n", __FILE__, __FUNCTION__);1153 dprintf(stderr, "%s, %s():\n", __FILE__, __FUNCTION__);
1151 1154
1152 if (inited) {1155 if (inited) {
1153#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)1156#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__) && !defined TCC_MUSL
1154 if (print_heap) {1157 if (print_heap) {
1155 extern void __libc_freeres (void);1158 extern void __libc_freeres (void);
1156 __libc_freeres ();1159 __libc_freeres ();

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