From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [IPv6:2001:67c:2050:0:465::202]) by sourceware.org (Postfix) with ESMTPS id F10A03853827 for ; Mon, 3 Oct 2022 20:36:01 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org F10A03853827 Authentication-Results: sourceware.org; dmarc=pass (p=reject dis=none) header.from=aarsen.me Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=aarsen.me Received: from smtp202.mailbox.org (smtp202.mailbox.org [10.196.197.202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4MhCK95tVLz9sWQ; Mon, 3 Oct 2022 22:35:57 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1664829357; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=GLIgQVs5igT4s9LNh3J93Hkog+cVp+IC97e1kccGYSg=; b=EfSSxxbcaI0kRRl2pZ/r27Yx4IOpLW4U/3mJq+/BBu2a+xcdnb8cJu5UuGixOciHAEzVzs VwoZmb5kJ+YV2LW8VrBPCmabgrQdsNd+nJJdFBbQUA7J1QXsBrdanvCwV3Fq8ujfeQP7PG anlM7wfFMY8BntnbPHg9FFtCGJdYBtW+ZlXlrPRnVVi4Qq3qGtiEqPJp8JhGgJ1d0vDAZY w8Jfd1soAHdm4WfKTawIxT3oovIofqZ5doWoPn1aiUu1cLP3qugsB4OsroXzpWP6x4dDE4 0VGzkZ3qzcx/go3Rad7j50+DrP1GyKOIs/7yv7pa4ics+LHzwyyZFS0+q6gpbA== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Subject: [PATCH] elf: ELF toolchain --without-{headers,newlib} should provide stdint.h Date: Mon, 3 Oct 2022 22:35:44 +0200 Message-Id: <20221003203543.154431-1-arsen@aarsen.me> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: 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(+) diff --git a/gcc/config.gcc b/gcc/config.gcc index 555f257c2e7..6633910d2b7 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -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 -- 2.37.3