glibc/sysdeps
Joseph Myers b8cc607f3c Do not define static_assert or thread_local in headers for C2x
C2x makes static_assert and thread_local into keywords, removing the
definitions as macros in assert.h and threads.h.  Thus, disable those
macros in those glibc headers for C2x.

The disabling is done based on a combination of language version and
__GNUC_PREREQ, *not* based on __GLIBC_USE (ISOC2X), on the principle
that users of the header (when requesting C11 or later APIs - not
assert.h for C99 and older API versions) should always have the names
static_assert or thread_local available after inclusion of the header,
whether as a keyword or as a macro.  Thus, when using a compiler
without the keywords (whether an older compiler, possibly in C2x mode,
or _GNU_SOURCE with any compiler but in an older language mode, for
example) the macros should be defined, even when C2x APIs have been
requested.  The __GNUC_PREREQ conditionals here may well need updating
with the versions of other compilers that gained support for these
keywords in C2x mode.

Tested for x86_64.
2022-09-07 18:39:28 +00:00
..
aarch64 csu: Change start code license to have link exception 2022-08-26 09:14:53 +01:00
alpha alpha: Remove _dl_skip_args usage 2022-05-30 16:32:22 -03:00
arc csu: Change start code license to have link exception 2022-08-26 09:14:53 +01:00
arm arm: Remove nested functionf rom relocate_pc24 2022-08-12 09:46:22 -03:00
csky csky: Remove _dl_skip_args usage 2022-05-30 16:32:33 -03:00
generic elf: Rename _dl_sort_maps parameter from skip to force_first 2022-09-06 07:38:33 +02:00
gnu Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
hppa hppa: Remove _dl_skip_args usage (BZ# 29165) 2022-05-30 16:32:35 -03:00
htl htl: Make pthread*_cond_timedwait register wref before releasing mutex 2022-08-22 22:27:24 +02:00
hurd hurd: Fix pthread_kill on exiting/ted thread 2022-01-15 15:11:54 +01:00
i386 i386: Use cmpl instead of cmp 2022-08-05 09:28:39 -03:00
ia64 grep: egrep -> grep -E, fgrep -> grep -F 2022-06-05 12:09:02 -07:00
ieee754 Ensure calculations happen with desired rounding mode in y1lf128 2022-08-18 12:32:18 +12:00
loongarch LoongArch: Add soft float support. 2022-09-01 09:10:08 +08:00
m68k m68k: optimize RTLD_START 2022-06-25 00:22:02 +02:00
mach hurd: Fix vm_size_t incoherencies 2022-08-29 01:42:47 +02:00
microblaze microblaze: Remove _dl_skip_args usage 2022-05-30 16:33:14 -03:00
mips mips: Remove _dl_skip_args usage 2022-05-30 16:33:16 -03:00
nios2 Remove remnant reference to ELF_RTYPE_CLASS_EXTERN_PROTECTED_DATA 2022-06-15 13:02:17 -07:00
nptl libio: Improve performance of IO locks 2022-08-11 16:47:45 +01:00
or1k csu: Change start code license to have link exception 2022-08-26 09:14:53 +01:00
posix posix: Fix macro expansion producing 'defined' has undefined behavior 2022-08-30 08:40:47 -03:00
powerpc arc4random: simplify design for better safety 2022-07-27 08:58:27 -03:00
pthread Do not define static_assert or thread_local in headers for C2x 2022-09-07 18:39:28 +00:00
riscv riscv: Update rv64 libm test ulps 2022-07-27 10:50:20 -03:00
s390 s390: Move hwcaps/platform names out of _rtld_global_ro 2022-08-25 21:33:12 +02:00
sh sh: Remove _dl_skip_args usage 2022-05-30 16:33:28 -03:00
sparc Makeconfig: Set pie-ccflag to -fPIE by default [BZ# 29514] 2022-08-29 09:03:00 -04:00
unix LoongArch: Add soft float support. 2022-09-01 09:10:08 +08:00
wordsize-32 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
wordsize-64 Update copyright dates with scripts/update-copyrights 2022-01-01 11:40:24 -08:00
x86 math: x86: Use prefix for FP_INIT_ROUNDMODE 2022-09-05 10:54:41 -03:00
x86_64 nptl: x86_64: Use same code for CURRENT_STACK_FRAME and stackinfo_get_sp 2022-08-31 09:04:27 -03:00