https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134

            Bug ID: 107134
           Summary: fatal error: stdint.h: No such file or directory for
                    freestanding C++ toolchain
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: unlvsur at live dot com
  Target Milestone: ---

x86_64-elf-g++ -v
Using built-in specs.
COLLECT_GCC=x86_64-elf-g++
COLLECT_LTO_WRAPPER=/home/cqwrteur/toolchains/native/x86_64-elf/libexec/gcc/x86_64-elf/13.0.0/lto-wrapper
Target: x86_64-elf
Configured with: ../../../../gcc/configure --disable-nls --disable-werror
--target=x86_64-elf --prefix=/home/cqwrteur/toolchains/native/x86_64-elf
--without-headers --disable-hosted-libstdcxx --disable-libstdcxx-verbose
--enable-languages=c,c++ --enable-multilib
Thread model: single
Supported LTO compression algorithms: zlib
gcc version 13.0.0 20221003 (experimental) (GCC) 


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
    9 | # include_next <stdint.h>
      |                ^~~~~~~~~~
compilation terminated.

stdint.h requires -ffreestanding flag to include the right header. However
--without-headers --disable-hosted-libstdcxx already implies it is
freestanding. it needs a fix the stdint.h

Reply via email to