History

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)

Meng Zhuo committed 6 months ago

Commit 256b4ef1 parent 85025402 files · +3 −1Browse files

Unified · Split

2 files
  1. tccmacho.c +1 −0
  2. tests/tests2/Makefile +2 −1
tccmacho.c+1−0
@@ -1058,6 +1058,7 @@ static void convert_symbol(TCCState *s1, struct macho *mo, struct nlist_64 *pn) · 1057 unmodified lines
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+2−1
@@ -19,7 +19,7 @@ ifeq (,$(filter i386 x86_64,$(ARCH))) · 18 unmodified lines
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-) · 24 unmodified lines
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

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