elf: ELF toolchain --without-{headers, newlib} should provide stdint.h
Commit Message
stdint.h is considered a freestanding headers by C, and a valid stdint.h
is required for certain parts of libstdc++' configuration, so we should
simply provide one when we have no other way (i.e. newlib or
user-specified sysroot) of getting one.
gcc/ChangeLog:
* config.gcc: --target=*-elf --without-{newlib,headers} should
provide stdint.h.
---
Evening,
Currently, freestanding *-elf toolchains without newlib will always produce
invalid stdint.h files, tripping up libstdc++ configure scripts (see PR104605).
This patch should make no-newlib no-headers always provide stdint.h.
Thanks.
gcc/config.gcc | 5 +++++
1 file changed, 5 insertions(+)
Comments
Evening,
Ping on this patch, it should fix some configuration issues we get on
ELF targets (especially in libstdc++).
https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602751.html
Thanks,
On Mon, Oct 10, 2022 at 8:06 PM Arsen Arsenović via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> Evening,
>
> Ping on this patch, it should fix some configuration issues we get on
> ELF targets (especially in libstdc++).
>
> https://gcc.gnu.org/pipermail/gcc-patches/2022-October/602751.html
OK.
Thanks,
Richard.
> Thanks,
> --
> Arsen Arsenović
On Tuesday, 11 October 2022 08:47:32 CEST Richard Biener wrote:
> OK.
Thanks for the review. I don't have push rights currently, so could you
push this for me?
Have a good evening,
@@ -1079,6 +1079,11 @@ case ${target} in
# Assume that newlib is being used and so __cxa_atexit is provided.
default_use_cxa_atexit=yes
use_gcc_stdint=wrap
+
+ case "${with_newlib}-${with_headers}" in
+ no-no) use_gcc_stdint=provide ;;
+ *) ;;
+ esac
;;
esac