glibc/sysdeps
Florian Weimer aaacde11f2 Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN
<limits.h> used to be a header file with no declarations.
GCC's libgomp includes it in a #pragma GCC visibility hidden block.
Including <unistd.h> from <limits.h> (indirectly) declares everything
in <unistd.h> with hidden visibility, resulting in linker failures.

This commit avoids C declarations in assembler mode and only declares
__sysconf in <limits.h> (and not the entire contents of <unistd.h>).
The __sysconf symbol is already part of the ABI.  PTHREAD_STACK_MIN
is no longer defined for __USE_DYNAMIC_STACK_SIZE && __ASSEMBLER__
because there is no possible definition.

Additionally, PTHREAD_STACK_MIN is now defined by <pthread.h> for
__USE_MISC because this is what developers expect based on the macro
name.  It also helps to avoid libgomp linker failures in GCC because
libgomp includes <pthread.h> before its visibility hacks.

Reviewed-by: Carlos O'Donell <carlos@redhat.com>
2021-07-12 18:43:32 +02:00
..
aarch64 AArch64: Add hp-timing.h 2021-07-01 15:42:05 +01:00
alpha nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
arc ARC: Update ulps 2021-04-14 09:24:45 -07:00
arm nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
csky Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
generic Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00
gnu Add RFC 8335 Definitions from Linux 5.13 2021-06-29 15:38:27 -03:00
hppa nptl: Move pthread_spin_init, Move pthread_spin_unlock into libc 2021-04-23 17:06:44 +02:00
htl Linux: Cleanups after librt move 2021-06-28 09:51:01 +02:00
hurd Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
i386 Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00
ia64 nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
ieee754 Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
m68k m68: Fix build after 9acda61d94 2021-04-06 15:10:31 -03:00
mach hurd _Fork: Drop duplicate malloc_fork_lock calls 2021-07-11 17:52:52 +00:00
microblaze Reduce the statically linked startup code [BZ #23323] 2021-02-25 12:13:02 +01:00
mips Update MIPS libm-test-ulps 2021-07-07 15:50:18 +00:00
nios2 Update Nios II libm-test-ulps. 2021-04-01 19:41:40 +00:00
nptl Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
posix Define PTHREAD_STACK_MIN to sysconf(_SC_THREAD_STACK_MIN) 2021-07-09 15:10:35 -07:00
powerpc Force building with -fno-common 2021-07-09 20:09:14 +02:00
pthread Linux: Cleanups after librt move 2021-06-28 09:51:01 +02:00
riscv Update math: redirect roundeven function 2021-06-27 07:56:57 -07:00
s390 s390: Fix MEMCHR_Z900_G5 ifunc-variant if n>=0x80000000 [BZ #28024] 2021-07-01 16:46:59 +02:00
sh nptl: Move pthread_spin_trylock into libc 2021-04-23 17:06:48 +02:00
sparc nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
unix Reduce <limits.h> pollution due to dynamic PTHREAD_STACK_MIN 2021-07-12 18:43:32 +02:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2021-01-02 12:17:34 -08:00
x86 x86: Check RTM_ALWAYS_ABORT for RTM [BZ #28033] 2021-07-01 10:47:35 -07:00
x86_64 Add a generic malloc test for MALLOC_ALIGNMENT 2021-07-09 06:39:30 -07:00