summaryrefslogtreecommitdiff
path: root/nptl/sysdeps/sparc/tls.h
diff options
context:
space:
mode:
Diffstat (limited to 'nptl/sysdeps/sparc/tls.h')
-rw-r--r--nptl/sysdeps/sparc/tls.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/nptl/sysdeps/sparc/tls.h b/nptl/sysdeps/sparc/tls.h
index 8f54a0bb23..54b54859d9 100644
--- a/nptl/sysdeps/sparc/tls.h
+++ b/nptl/sysdeps/sparc/tls.h
@@ -69,11 +69,13 @@ typedef struct
register struct pthread *__thread_self __asm__("%g7");
-/* This is the size of the initial TCB. */
-# define TLS_INIT_TCB_SIZE sizeof (tcbhead_t)
+/* This is the size of the initial TCB. Can't be just sizeof (tcbhead_t),
+ because NPTL getpid, __libc_alloca_cutoff etc. need (almost) the whole
+ struct pthread even when not linked with -lpthread. */
+# define TLS_INIT_TCB_SIZE sizeof (struct pthread)
/* Alignment requirements for the initial TCB. */
-# define TLS_INIT_TCB_ALIGN __alignof__ (tcbhead_t)
+# define TLS_INIT_TCB_ALIGN __alignof__ (struct pthread)
/* This is the size of the TCB. */
# define TLS_TCB_SIZE sizeof (struct pthread)