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
This commit is contained in:
grischka
2020-12-16 20:08:43 +01:00
parent 02f61d5b49
commit e2e62fcb8b
13 changed files with 168 additions and 207 deletions

View File

@@ -161,6 +161,9 @@ static pthread_spinlock_t bounds_spin;
#define HAVE_TLS_FUNC (1)
#define HAVE_TLS_VAR (0)
#endif
#ifdef TCC_MUSL
# undef HAVE_CTYPE
#endif
#endif
#if MALLOC_REDIR
@@ -1150,7 +1153,7 @@ void __attribute__((destructor)) __bound_exit(void)
dprintf(stderr, "%s, %s():\n", __FILE__, __FUNCTION__);
if (inited) {
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__)
#if !defined(_WIN32) && !defined(__APPLE__) && !defined(__OpenBSD__) && !defined TCC_MUSL
if (print_heap) {
extern void __libc_freeres (void);
__libc_freeres ();