From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1666) id 2FF453858D39; Mon, 17 Oct 2022 06:59:46 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 2FF453858D39 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gcc.gnu.org; s=default; t=1665989986; bh=xT17j6TvM8qs+rmkxKqLJxCmu5+0WQYH51No8XAVtL4=; h=From:To:Subject:Date:From; b=pl6M/5U+L8YicbHfUrOoMnSJEPfEi5hDPh2HrVnphrF0tYUH7Ygf3EDozIx6LvjrZ zRnHxosQ4JpZx2vSpW9W2sUulKSLDCFENWzqj89Zo/52ANn7blhUFX0Br3f8pCJ6lT yVlgbNp2dg6sE8Qs6WR2ftZLVdOYAv2uX9vFWXVI= MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="utf-8" From: Richard Biener To: gcc-cvs@gcc.gnu.org Subject: [gcc r13-3322] elf: ELF toolchain --without-{headers, newlib} should provide stdint.h X-Act-Checkin: gcc X-Git-Author: Arsen Arsenovic X-Git-Refname: refs/heads/master X-Git-Oldrev: fd206f0e95fb6f41b96eaaaab1dc0c30378e5e08 X-Git-Newrev: f10b9f64133cbfb5ba06f4deb23766f92629bdd9 Message-Id: <20221017065946.2FF453858D39@sourceware.org> Date: Mon, 17 Oct 2022 06:59:46 +0000 (GMT) List-Id: https://gcc.gnu.org/g:f10b9f64133cbfb5ba06f4deb23766f92629bdd9 commit r13-3322-gf10b9f64133cbfb5ba06f4deb23766f92629bdd9 Author: Arsen Arsenovic Date: Mon Oct 17 08:58:07 2022 +0200 elf: ELF toolchain --without-{headers, newlib} should provide stdint.h 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. Diff: --- gcc/config.gcc | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gcc/config.gcc b/gcc/config.gcc index 8d5972fecf7..2af30b4a6ec 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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