From: "Arsen Arsenović" <arsen@aarsen.me>
To: gcc-patches@gcc.gnu.org
Cc: libstdc++@gcc.gnu.org, "Jonathan Wakely" <jwakely@redhat.com>,
"Arsen Arsenović" <arsen@aarsen.me>
Subject: [PATCH 08/10] libstdc++: Add effective-target 'hosted' for testsuite [PR103626]
Date: Fri, 30 Sep 2022 18:45:54 +0200 [thread overview]
Message-ID: <20220930164556.1198044-9-arsen@aarsen.me> (raw)
In-Reply-To: <20220930164556.1198044-1-arsen@aarsen.me>
From: Jonathan Wakely <jwakely@redhat.com>
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ć <arsen@aarsen.me>
---
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
next prev parent reply other threads:[~2022-09-30 16:46 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-09-30 16:45 [PATCH 00/10] c-family,libstdc++: P1642 and related changes Arsen Arsenović
2022-09-30 16:45 ` [PATCH 01/10] libstdc++: Make _GLIBCXX_HOSTED respect -ffreestanding [PR103626] Arsen Arsenović
2022-09-30 16:45 ` [PATCH 02/10] libstdc++: Filter out unconditional <stdio.h> default include Arsen Arsenović
2022-09-30 16:45 ` [PATCH 03/10] libstdc++: Adjust precompiled headers for freestanding Arsen Arsenović
2022-09-30 16:45 ` [PATCH 04/10] libstdc++: Mark headers that must be hosted as such [PR103626] Arsen Arsenović
2022-09-30 16:45 ` [PATCH 05/10] c-family: Implement new `int main' semantics in freestanding Arsen Arsenović
2022-09-30 16:45 ` [PATCH 06/10] libstdc++: Rework how freestanding install works [PR106953] Arsen Arsenović
2022-09-30 16:45 ` [PATCH 07/10] libstdc++: Make some tests work on freestanding [PR103626] Arsen Arsenović
2022-09-30 16:45 ` Arsen Arsenović [this message]
2022-09-30 16:45 ` [PATCH 09/10] libstdc++: Re-enable std::hash<std::bitset> in " Arsen Arsenović
2022-09-30 16:45 ` [PATCH 10/10] libstdc++: Disable hosted-only tests [PR103626] Arsen Arsenović
2022-09-30 18:15 ` [PATCH 00/10] c-family,libstdc++: P1642 and related changes Jonathan Wakely
2022-10-03 14:49 ` Jonathan Wakely
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20220930164556.1198044-9-arsen@aarsen.me \
--to=arsen@aarsen.me \
--cc=gcc-patches@gcc.gnu.org \
--cc=jwakely@redhat.com \
--cc=libstdc++@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).