Skip to content

Commit 256b4ef

Browse files
committed
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)
1 parent 8502540 commit 256b4ef

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

tccmacho.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,7 @@ static void convert_symbol(TCCState *s1, struct macho *mo, struct nlist_64 *pn)
10581058
case STT_NOTYPE:
10591059
case STT_OBJECT:
10601060
case STT_FUNC:
1061+
case STT_TLS:
10611062
case STT_SECTION:
10621063
n.n_type = N_SECT;
10631064
break;

tests/tests2/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ ifeq (,$(filter i386 x86_64,$(ARCH)))
1919
SKIP += 85_asm-outside-function.test # x86 asm
2020
SKIP += 127_asm_goto.test # hardcodes x86 asm
2121
endif
22-
ifeq (,$(filter x86_64 riscv64 arm64 arm i386,$(ARCH)))
22+
ifeq (,$(filter x86_64 riscv64 arm64 i386,$(ARCH)))
2323
SKIP += 144_tls.test # TLS only implemented on these architectures so far
2424
endif
2525
ifeq ($(CONFIG_backtrace),no)
@@ -50,6 +50,7 @@ ifeq (-$(CONFIG_WIN32)-,-yes-)
5050
SKIP += 114_bound_signal.test # No pthread support
5151
SKIP += 117_builtins.test # win32 port doesn't define __builtins
5252
SKIP += 124_atomic_counter.test # No pthread support
53+
SKIP += 144_tls.test # No pthread support
5354
endif
5455
ifneq (,$(filter OpenBSD FreeBSD NetBSD,$(TARGETOS)))
5556
SKIP += 106_versym.test # no pthread_condattr_setpshared

0 commit comments

Comments
 (0)