This patch has broken bootstrap of a cross toolchain for x86_64 (the case
where inhibit_libc is defined because there is no libc for the target
available at that stage in the bootstrap process).
In file included from
../../.././gcc/mm_malloc.h:27:10: fatal error: stdlib.h: No such file or
The patch makes shadow-stack-unwind.h include <x86intrin.h>, which ends up
including <mm_malloc.h>, which includes <stdlib.h> and <errno.h>
unconditionally. You can't include any libc system headers
unconditionally from libgcc (only when inhibit_libc is not defined - and
<mm_malloc.h>, being an installed header, can't test inhibit_libc because
it's in the user's namespace). So I think you need to avoid the
mm_malloc.h include here somehow (without adding any inhibit_libc
conditionals to installed headers).
Joseph S. Myers