[Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134 --- Comment #6 from CVS Commits --- The master branch has been updated by Jonathan Wakely : https://gcc.gnu.org/g:7cdab65f3d770345903023f357b6ca96bc85a002 commit r13-3059-g7cdab65f3d770345903023f357b6ca96bc85a002 Author: Jonathan Wakely Date: Mon Oct 3 21:49:27 2022 +0100 libstdc++: Make work freestanding [PR107134] When gcc/config.gcc defines use_gcc_stdin=wrap, GCC's tries to use libc's unless -ffreestanding is used. When libstdc++ is configured --disable-hosted-libstdcxx we want to work even without -ffreestanding being given. This is a kluge to make it include GCC's directly even without -ffreestanding. libstdc++-v3/ChangeLog: PR libstdc++/107134 * include/c_global/cstdint [!_GLIBCXX_HOSTED]: Include directly.
[Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134 Jonathan Wakely changed: What|Removed |Added Status|UNCONFIRMED |RESOLVED Resolution|--- |DUPLICATE --- Comment #5 from Jonathan Wakely --- I think this is another dup of PR 104605, we don't need a second bug about the same thing. *** This bug has been marked as a duplicate of bug 104605 ***
[Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134 --- Comment #4 from Jonathan Wakely --- Oh it's not libstdc++'s one, it's GCC's one.
[Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134 --- Comment #3 from Jonathan Wakely --- (In reply to cqwrteur from comment #0) > x86_64-elf-g++ -c b.cc -std=c++23 > In file included from > /home/cqwrteur/toolchains/native/x86_64-elf/x86_64-elf/include/c++/13.0.0/ > cstdint:41, > from b.cc:1: > /home/cqwrteur/toolchains/native/x86_64-elf/lib/gcc/x86_64-elf/13.0.0/ > include/stdint.h:9:16: fatal error: stdint.h: No such file or directory Wait a minute, why do you even have libstdc++'s installed for this configuration?
[Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134 --- Comment #2 from Jonathan Wakely --- Although we could do: #if ! _GLIBCXX_HOSTED #include #else #include_next #endif to make it work.
[Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134 --- Comment #1 from Jonathan Wakely --- With current trunk, you need to use -ffreestanding if you are compiling for freestanding. --without-headers --disable-hosted-libstdcxx says to build a freestanding library, that doesn't tell the compiler anything when you invoke it.