aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/unix/sysv/linux/i386/lowlevellock.h9
-rw-r--r--sysdeps/unix/sysv/linux/x86_64/lowlevellock.h1
2 files changed, 8 insertions, 2 deletions
diff --git a/sysdeps/unix/sysv/linux/i386/lowlevellock.h b/sysdeps/unix/sysv/linux/i386/lowlevellock.h
index fb59b57934..38fbc2556f 100644
--- a/sysdeps/unix/sysv/linux/i386/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/i386/lowlevellock.h
@@ -26,7 +26,14 @@
# include <sys/param.h>
# include <bits/pthreadtypes.h>
# include <kernel-features.h>
-# include <tcb-offsets.h>
+/* <tcb-offsets.h> is generated from tcb-offsets.sym to define offsets
+ and sizes of types in <tls.h> as well as <pthread.h> which includes
+ <lowlevellock.h> via nptl/descr.h. Don't include <tcb-offsets.h>
+ when generating <tcb-offsets.h> to avoid circular dependency which
+ may lead to build hang on a many-core machine. */
+# ifndef GEN_AS_CONST_HEADERS
+# include <tcb-offsets.h>
+# endif
# ifndef LOCK_INSTR
# ifdef UP
diff --git a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
index a8bcfbe4a3..eedb6fc990 100644
--- a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
+++ b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.h
@@ -26,7 +26,6 @@
# include <sys/param.h>
# include <bits/pthreadtypes.h>
# include <kernel-features.h>
-# include <tcb-offsets.h>
# ifndef LOCK_INSTR
# ifdef UP