https://gcc.gnu.org/bugzilla/show_bug.cgi?id=104605
--- Comment #16 from Jonathan Wakely <redi at gcc dot gnu.org> --- Oops, I put the wrong PR number on this commit: https://gcc.gnu.org/g:7cdab65f3d770345903023f357b6ca96bc85a002 commit r13-3059-g7cdab65f3d770345903023f357b6ca96bc85a002 Author: Jonathan Wakely <jwak...@redhat.com> Date: Mon Oct 3 21:49:27 2022 +0100 libstdc++: Make <cstdint> work freestanding [PR107134] When gcc/config.gcc defines use_gcc_stdin=wrap, GCC's <stdint.h> tries to use libc's <stdint.h> unless -ffreestanding is used. When libstdc++ is configured --disable-hosted-libstdcxx we want <cstdint> to work even without -ffreestanding being given. This is a kluge to make it include GCC's <stdint-gcc.h> directly even without -ffreestanding. libstdc++-v3/ChangeLog: PR libstdc++/107134 * include/c_global/cstdint [!_GLIBCXX_HOSTED]: Include <stdint-gcc.h> directly. This should be fixed now, please check. I think we still want Arsen's patch in comment 10 for correctness, but this makes libstdc++ cope without it.