From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mout-p-103.mailbox.org (mout-p-103.mailbox.org [80.241.56.161]) by sourceware.org (Postfix) with ESMTPS id 3EA313851C1F; Fri, 30 Sep 2022 16:46:37 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 3EA313851C1F 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 smtp102.mailbox.org (smtp102.mailbox.org [10.196.197.102]) (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-103.mailbox.org (Postfix) with ESMTPS id 4MfGMt4hy2z9sWC; Fri, 30 Sep 2022 18:46:34 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aarsen.me; s=MBO0001; t=1664556394; 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=pi8wgkfGId4UPPNVk7AiXAu4RxY/FHpuiFN/UB12n4A=; b=agqyVzLwvRgoKshWYtFeFK5LDeRrPfLl0JUBz0P/SFuNx4Xo45/Bn2e1N1/FvA/51MMzeo JXBT553L9mffIiDK9kIhezQ8vmCiaHF3kRwcquO82l9UdKDgvoDCz51SRbf1nCYUJhbWK9 gZGkapyr2ZSs+4yWJduORUPWr1UzpnhlaV10oj5n8gxHuVPv/k3ke6f+owmk2dT5nnW/ze hPwJXsTTaMYoLPX6W3sYRfNjDXLL2qRqkZvbyfnYDhccE49l5ewLo0mJWOVtEVEcS0m+jD uI6cxZp5xf7R2DjtTPDlTyvrIrmUFWxORA2jc6Z89g/jHi0kelbR42xJZdNutA== From: =?UTF-8?q?Arsen=20Arsenovi=C4=87?= To: gcc-patches@gcc.gnu.org Cc: libstdc++@gcc.gnu.org, Jonathan Wakely , =?UTF-8?q?Arsen=20Arsenovi=C4=87?= Subject: [PATCH 08/10] libstdc++: Add effective-target 'hosted' for testsuite [PR103626] Date: Fri, 30 Sep 2022 18:45:54 +0200 Message-Id: <20220930164556.1198044-9-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=-11.3 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: From: Jonathan Wakely PR libstdc++/103626 - _GLIBCXX_HOSTED should respect -ffreestanding libstdc++-v3/ChangeLog: PR libstdc++/103626 * testsuite/lib/libstdc++.exp (check_effective_target_stacktrace): Also require hosted. (check_effective_target_hosted): New proc. Signed-off-by: Arsen Arsenović --- libstdc++-v3/testsuite/lib/libstdc++.exp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libstdc++-v3/testsuite/lib/libstdc++.exp b/libstdc++-v3/testsuite/lib/libstdc++.exp index d3256b6c8c4..635f16db4e8 100644 --- a/libstdc++-v3/testsuite/lib/libstdc++.exp +++ b/libstdc++-v3/testsuite/lib/libstdc++.exp @@ -1376,7 +1376,7 @@ proc check_effective_target_std_allocator_new { } { # Return 1 if libstdc++ was built as --enable-libstdcxx-backtrace proc check_effective_target_stacktrace { } { return [check_v3_target_prop_cached et_stacktrace { - set cond "_GLIBCXX_HAVE_STACKTRACE" + set cond "_GLIBCXX_HAVE_STACKTRACE && _GLIBCXX_HOSTED" return [v3_check_preprocessor_condition stacktrace $cond] }] } @@ -1389,6 +1389,14 @@ proc check_effective_target_rtti { } { }] } +# Return 1 if a hosted implementation is available (i.e. not freestanding). +proc check_effective_target_hosted { } { + return [check_v3_target_prop_cached et_hosted { + set cond "_GLIBCXX_HOSTED" + return [v3_check_preprocessor_condition hosted $cond] + }] +} + set additional_prunes "" if { [info exists env(GCC_RUNTEST_PARALLELIZE_DIR)] \ -- 2.37.3