From a7fd14096c8dbc9cb5ed9a3731753b24e32d5757 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Wed, 4 Sep 2019 14:44:03 -0400 Subject: [PATCH] fix typo with tls initialization I tested that hello world cross compiles to armv7 now. closes #3167 --- std/os/linux/tls.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/std/os/linux/tls.zig b/std/os/linux/tls.zig index 3c55013f47..ea1075e77a 100644 --- a/std/os/linux/tls.zig +++ b/std/os/linux/tls.zig @@ -162,7 +162,7 @@ pub fn initTLS() void { if (tls_phdr) |phdr| { // If the cpu is arm-based, check if it supports the TLS register - if (builtin.arch == builtin.Arch.arm and hwcap & std.os.linux.HWCAP_TLS == 0) { + if (builtin.arch == builtin.Arch.arm and at_hwcap & std.os.linux.HWCAP_TLS == 0) { // If the CPU does not support TLS via a coprocessor register, // a kernel helper function can be used instead on certain linux kernels. // See linux/arch/arm/include/asm/tls.h and musl/src/thread/arm/__set_thread_area.c.