fix: TLS test failures on osx/win32/armv7

- tccmacho.c: add STT_TLS to convert_symbol() for Mach-O output
- tests/tests2/Makefile: skip 144_tls on Win32 (no pthread.h) and
  remove arm from TLS arch list (QEMU user-mode cannot emulate
  MRC p15 TLS register access)
This commit is contained in:
Meng Zhuo 2026-05-13 12:28:58 +08:00
parent 8502540b4a
commit 256b4ef63c
2 changed files with 3 additions and 1 deletions

View File

@ -1058,6 +1058,7 @@ static void convert_symbol(TCCState *s1, struct macho *mo, struct nlist_64 *pn)
case STT_NOTYPE:
case STT_OBJECT:
case STT_FUNC:
case STT_TLS:
case STT_SECTION:
n.n_type = N_SECT;
break;

View File

@ -19,7 +19,7 @@ ifeq (,$(filter i386 x86_64,$(ARCH)))
SKIP += 85_asm-outside-function.test # x86 asm
SKIP += 127_asm_goto.test # hardcodes x86 asm
endif
ifeq (,$(filter x86_64 riscv64 arm64 arm i386,$(ARCH)))
ifeq (,$(filter x86_64 riscv64 arm64 i386,$(ARCH)))
SKIP += 144_tls.test # TLS only implemented on these architectures so far
endif
ifeq ($(CONFIG_backtrace),no)
@ -50,6 +50,7 @@ ifeq (-$(CONFIG_WIN32)-,-yes-)
SKIP += 114_bound_signal.test # No pthread support
SKIP += 117_builtins.test # win32 port doesn't define __builtins
SKIP += 124_atomic_counter.test # No pthread support
SKIP += 144_tls.test # No pthread support
endif
ifneq (,$(filter OpenBSD FreeBSD NetBSD,$(TARGETOS)))
SKIP += 106_versym.test # no pthread_condattr_setpshared