https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100289
--- Comment #17 from rudi at heitbaum dot com --- Hi Joerg, I saw your comment and took it as a prompt. I fixed the LE toolchain with your patch. I thought about it further and then used --disable-gcov as the gcc:bootstrap - leaving HAVE_SYS_MMAN_H defined for the gcc:host target. Thus I did not end up using the #undef / your patch. Given that the “gcc:bootstrap with gcov” would not be used once the gcc:host is built. The PR is at https://github.com/LibreELEC/LibreELEC.tv/pull/6253 The issue is still there during the bootstrap build, but maybe --disable-gcov might help you in your cross compile toolchain too. The LE toolchain builds “target” as a cross compile even if the triple is the same. The usual build host is x86_64 though build are also done on aarch64 as well.