]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
elf: ELF toolchain --without-{headers, newlib} should provide stdint.h
authorArsen Arsenovic <arsen@aarsen.me>
Mon, 17 Oct 2022 06:58:07 +0000 (08:58 +0200)
committerRichard Biener <rguenther@suse.de>
Mon, 17 Oct 2022 06:59:17 +0000 (08:59 +0200)
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.

* config.gcc: --target=*-elf --without-{newlib,headers} should
provide stdint.h.

gcc/config.gcc

index 8d5972fecf7ad0f325ccdf09be37a5c26a681c60..2af30b4a6ecced56a0e288b42246304120c890da 100644 (file)
@@ -1082,6 +1082,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