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