[gcc r15-2944] libstdc++-v3: testsuite: Prune uncapitalized "in function" linker warning
Hans-Peter Nilsson
hp@gcc.gnu.org
Fri Aug 16 01:07:53 GMT 2024
https://gcc.gnu.org/g:98e1b19f6690f5e19031ba4f843c22208bbfb14a
commit r15-2944-g98e1b19f6690f5e19031ba4f843c22208bbfb14a
Author: Hans-Peter Nilsson <hp@axis.com>
Date: Wed Aug 14 04:38:05 2024 +0200
libstdc++-v3: testsuite: Prune uncapitalized "in function" linker warning
Newer newlib trigger warnings about certain functions not implemented
(_getentropy) when testing libstdc++-v3.
Since 2018 (circa binutils-2.31) the "in function" prefix isn't
capitalized for those "not implemented" warnings when generated from
the linker (a GNU ld feature used by newlib). Dejagnu up to and
including at least dejagnu-1.6.3 (and git @ 42979bd3b9) assumes a
capital "In function", leaving that part unpruned, and boom we have
thousands of "excess errors" from the libstdc++-v3 testsuite.
While gcc/testsuite/lib/prune.exp:prune_gcc_output already deals with
this quirk with a vastly more generic pattern, I choose this simpler
tweak.
libstdc++-v3:
* testsuite/lib/prune.exp (libstdc++-dg-prune): Prune
uncapitalized "in function" warning from linker.
Diff:
---
libstdc++-v3/testsuite/lib/prune.exp | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/libstdc++-v3/testsuite/lib/prune.exp b/libstdc++-v3/testsuite/lib/prune.exp
index 071dcf34c1e..4250e2d39e7 100644
--- a/libstdc++-v3/testsuite/lib/prune.exp
+++ b/libstdc++-v3/testsuite/lib/prune.exp
@@ -80,6 +80,15 @@ proc libstdc++-dg-prune { system text } {
# Ignore dsymutil warning (tool bug is actually in the linker)
regsub -all "(^|\n)\[^\n\]*could not find object file symbol for symbol\[^\n\]*" $text "" text
+ # This pattern, except requiring a capitalized "In" and with a
+ # sub-pattern matching a subsequent line "is not implemented and will
+ # always fail", is part of the standard dejagnu prune_warnings function.
+ # There's also a separate single-line pattern pruning the "is not
+ # implemented and will always fail". Since that pattern is processed
+ # before this ${tool}-dg-prune function is called, we have to handle
+ # the single uncapitalized "in function" line.
+ regsub -all "(^|\n)\[^\n\]*: in function\[^\n\]*" $text "" text
+
# If exceptions are disabled, mark tests expecting exceptions to be enabled
# as unsupported.
if { ![check_effective_target_exceptions_enabled] } {
More information about the Libstdc++-cvs
mailing list