From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-102.mailbox.org (mout-p-102.mailbox.org [80.241.56.152]) by sourceware.org (Postfix) with ESMTPS id 9F180385C33A; Fri, 30 Sep 2022 16:46:22 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 9F180385C33A 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-102.mailbox.org (Postfix) with ESMTPS id 4MfGMb58D7z9sSZ; Fri, 30 Sep 2022 18:46:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1664556379; 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: in-reply-to:in-reply-to:references:references; bh=qe3FxIQ1zCquD8RdnozL/K26tvp6iPUzx+7JijoaUBM=; b=jmgAPw+Oy8XccPyfY6YULxiP3mRzUHizQON2EhghqirYvubhQFxX93SB/zvwU1f4WLq/Rk vG+TWzmpFzkpyVQf93rUmFHOMsSIbMhDaEcBa9HIW0x+GcPpO5BqBvmUd18tmbDuIRl4mF sG4P1YadYIbM5Mghruny2ddwI+82+ppeUER3wKkhYuyqLeMsMxm8aXrJxuIF/AGDHDXARx Y/aUYYYLrAH9/KQiIhp5MwgLzqTbdRhqgCpwaf1w8DwZYbBA/PXsuE5abb3vvc3ocaRjHc nrgslLD7fFWIb894IyU29q10zvMuTQStW0/hP0EqpAYjVte3yI+fLsm6qSRXAw== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Subject: [PATCH 02/10] libstdc++: Filter out unconditional default include Date: Fri, 30 Sep 2022 18:45:48 +0200 Message-Id: <20220930164556.1198044-3-arsen@aarsen.me> In-Reply-To: <20220930164556.1198044-1-arsen@aarsen.me> References: <20220930164556.1198044-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.1 required=5.0 tests=BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,GIT_PATCH_0,KAM_INFOUSMEBIZ,RCVD_IN_DNSWL_LOW,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: _AC_INCLUDES_DEFAULT_REQUIREMENTS including when checking for stdint.h has prevented proper detection of whether stdint.h is present, since it'd poison the cache variables with test results failing due to failing to include. As a solution, for autoconf versions under 2.70, we filter out that bit of code from ac_includes_default. This issue was fixed in autoconf-2.70. This also applies to various other headers, but was noticed when looking into why HAVE_STDINT_H was misdefined. libstdc++-v3/ChangeLog: * configure.ac: Remove any lines that unconditionally include from ac_includes_default, when running Autoconf <2.70. * configure: Regenerate. Signed-off-by: Arsen Arsenović --- libstdc++-v3/configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/libstdc++-v3/configure.ac b/libstdc++-v3/configure.ac index b351622bf46..c05fcdda7e9 100644 --- a/libstdc++-v3/configure.ac +++ b/libstdc++-v3/configure.ac @@ -58,6 +58,15 @@ else GLIBCXX_IS_NATIVE=true fi +# In the case that we're building without headers, we won't have +# available. In these cases, we have to instruct autotools to never include +# as a part of default headers. +m4_version_prereq([2.70], [], [ +if test "x$with_headers" = "xno"; then + ac_includes_default=`echo "$ac_includes_default" | sed '/^#include $/d'` +fi +]) + # Sets up automake. Must come after AC_CANONICAL_SYSTEM. Each of the # following is magically included in AUTOMAKE_OPTIONS in each Makefile.am. # 1.x: minimum required version -- 2.37.3