public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
@ 2022-10-03 17:31 unlvsur at live dot com
2022-10-03 17:36 ` [Bug c++/107134] " redi at gcc dot gnu.org
` (5 more replies)
0 siblings, 6 replies; 7+ messages in thread
From: unlvsur at live dot com @ 2022-10-03 17:31 UTC (permalink / raw)
To: gcc-bugs
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
@ 2022-10-03 17:36 ` redi at gcc dot gnu.org
2022-10-03 18:06 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-03 17:36 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> ---
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.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
2022-10-03 17:36 ` [Bug c++/107134] " redi at gcc dot gnu.org
@ 2022-10-03 18:06 ` redi at gcc dot gnu.org
2022-10-03 19:40 ` redi at gcc dot gnu.org
` (3 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-03 18:06 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Although we could do:
#if ! _GLIBCXX_HOSTED
#include <stdint-gcc.h>
#else
#include_next <stdint.h>
#endif
to make it work.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
2022-10-03 17:36 ` [Bug c++/107134] " redi at gcc dot gnu.org
2022-10-03 18:06 ` redi at gcc dot gnu.org
@ 2022-10-03 19:40 ` redi at gcc dot gnu.org
2022-10-03 19:42 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-03 19:40 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134
--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(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 <stdint.h> installed for this
configuration?
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
` (2 preceding siblings ...)
2022-10-03 19:40 ` redi at gcc dot gnu.org
@ 2022-10-03 19:42 ` redi at gcc dot gnu.org
2022-10-03 20:57 ` redi at gcc dot gnu.org
2022-10-04 14:07 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-03 19:42 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Oh it's not libstdc++'s one, it's GCC's one.
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
` (3 preceding siblings ...)
2022-10-03 19:42 ` redi at gcc dot gnu.org
@ 2022-10-03 20:57 ` redi at gcc dot gnu.org
2022-10-04 14:07 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: redi at gcc dot gnu.org @ 2022-10-03 20:57 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution|--- |DUPLICATE
--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
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 ***
^ permalink raw reply [flat|nested] 7+ messages in thread
* [Bug c++/107134] fatal error: stdint.h: No such file or directory for freestanding C++ toolchain
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
` (4 preceding siblings ...)
2022-10-03 20:57 ` redi at gcc dot gnu.org
@ 2022-10-04 14:07 ` cvs-commit at gcc dot gnu.org
5 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2022-10-04 14:07 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=107134
--- Comment #6 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by Jonathan Wakely <redi@gcc.gnu.org>:
https://gcc.gnu.org/g:7cdab65f3d770345903023f357b6ca96bc85a002
commit r13-3059-g7cdab65f3d770345903023f357b6ca96bc85a002
Author: Jonathan Wakely <jwakely@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.
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2022-10-04 14:07 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-03 17:31 [Bug c++/107134] New: fatal error: stdint.h: No such file or directory for freestanding C++ toolchain unlvsur at live dot com
2022-10-03 17:36 ` [Bug c++/107134] " redi at gcc dot gnu.org
2022-10-03 18:06 ` redi at gcc dot gnu.org
2022-10-03 19:40 ` redi at gcc dot gnu.org
2022-10-03 19:42 ` redi at gcc dot gnu.org
2022-10-03 20:57 ` redi at gcc dot gnu.org
2022-10-04 14:07 ` cvs-commit at gcc dot gnu.org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).