https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106693
Bug ID: 106693
Summary: gnat: poisoned calloc in gcc/ada/adaint.[hc] due to
use of sched.h on musl
Product: gcc
Version: 13.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: ada
Assignee: unassigned at gcc dot gnu.org
Reporter: andrewathalye at outlook dot com
Target Milestone: ---
On musl libc, sched.h makes use of calloc in a definition, which triggers GCC's
#pragma GNU poision from system.h. adaint.h and adaint.c cause this problem to
occur while building a native compiler, since they both conditionally include
sched.h.
Alpine Linux bypasses this by dropping the include and using void* instead of
cpu_set_t*. It could also be resolved the same way as the earlier bug 106102,
for example by creating a define USE_SCHED_H and implementing it before calloc
is poisoned.