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 /scratch/jmyers/glibc-bot/build/compilers/x86_64-linux-gnu/gcc-first/gcc/include/xmmintrin.h:34, from /scratch/jmyers/glibc-bot/build/compilers/x86_64-linux-gnu/gcc-first/gcc/include/x86intrin.h:33, from /scratch/jmyers/glibc-bot/src/gcc/libgcc/config/i386/shadow-stack-unwind.h:25, from ./md-unwind-support.h:27, from /scratch/jmyers/glibc-bot/src/gcc/libgcc/unwind-dw2.c:411: ../../.././gcc/mm_malloc.h:27:10: fatal error: stdlib.h: No such file or directory #include <stdlib.h> ^~~~~~~~~~ https://sourceware.org/ml/libc-testresults/2018-q1/msg00307.html 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 jos...@codesourcery.com