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
3030 XFLAGS = $(CFLAGS) -fPIC -gstabs -fno-omit-frame-pointer -Wno-unused-function -Wno-unused-variable
3131 endif
3232
33+ifneq ($(CONFIG_backtrace),no)
3334 # only for native compiler
35+ifneq ($(CONFIG_bcheck),no)
3436 $(X)BCHECK_O = bcheck.o
37+endif
3538 $(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
4240 endif
4341
42+DSO_O = dsohandle.o
43+
4444 I386_O = libtcc1.o alloca86.o alloca86-bt.o $(BT_O)
4545 X86_64_O = libtcc1.o alloca86_64.o alloca86_64-bt.o $(BT_O)
4646 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
8282 $(TOP)/%.o : %.c
8383 $S$(XCC) -c $< -o $@ $(XFLAGS)
8484
85−$(TOP)/bcheck.o : XFLAGS += -g
85+$(TOP)/bcheck.o : XFLAGS += -g $(if (CONFIG_musl),-DTCC_MUSL)
8686 $(TOP)/bt-exe.o : $(TOP)/tccrun.c
8787
8888 $(X)crt1w.o : crt1.c
lib/bcheck.c+4−1
@@ -161,6 +161,9 @@ static pthread_spinlock_t bounds_spin; · 160 unmodified lines
161161 #define HAVE_TLS_FUNC (1)
162162 #define HAVE_TLS_VAR (0)
163163 #endif
164+#ifdef TCC_MUSL
165+# undef HAVE_CTYPE
166+#endif
164167 #endif
165168
166169 #if MALLOC_REDIR
@@ -1150,7 +1153,7 @@ void __attribute__((destructor)) __bound_exit(void) · 983 unmodified lines
11501153 dprintf(stderr, "%s, %s():\n", __FILE__, __FUNCTION__);
11511154
11521155 if (inited) {
1153−#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
1156+#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__) && !defined TCC_MUSL
11541157 if (print_heap) {
11551158 extern void __libc_freeres (void);
11561159 __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