@@ -437,20 +437,22 @@ fn posixCallMainAndExit() callconv(.C) noreturn {
437
437
std .os .linux .pie .relocate (phdrs );
438
438
}
439
439
440
- // ARMv6 targets (and earlier) have no support for TLS in hardware.
441
- // FIXME: Elide the check for targets >= ARMv7 when the target feature API
442
- // becomes less verbose (and more usable).
443
- if (comptime native_arch .isARM ()) {
444
- if (at_hwcap & std .os .linux .HWCAP .TLS == 0 ) {
445
- // FIXME: Make __aeabi_read_tp call the kernel helper kuser_get_tls
446
- // For the time being use a simple abort instead of a @panic call to
447
- // keep the binary bloat under control.
448
- std .os .abort ();
440
+ if (! builtin .single_threaded ) {
441
+ // ARMv6 targets (and earlier) have no support for TLS in hardware.
442
+ // FIXME: Elide the check for targets >= ARMv7 when the target feature API
443
+ // becomes less verbose (and more usable).
444
+ if (comptime native_arch .isARM ()) {
445
+ if (at_hwcap & std .os .linux .HWCAP .TLS == 0 ) {
446
+ // FIXME: Make __aeabi_read_tp call the kernel helper kuser_get_tls
447
+ // For the time being use a simple abort instead of a @panic call to
448
+ // keep the binary bloat under control.
449
+ std .os .abort ();
450
+ }
449
451
}
450
- }
451
452
452
- // Initialize the TLS area.
453
- std .os .linux .tls .initStaticTLS (phdrs );
453
+ // Initialize the TLS area.
454
+ std .os .linux .tls .initStaticTLS (phdrs );
455
+ }
454
456
455
457
// The way Linux executables represent stack size is via the PT_GNU_STACK
456
458
// program header. However the kernel does not recognize it; it always gives 8 MiB.
0 commit comments