Adjust patterns for the GNU linker in prune_warnings
diff --git a/ChangeLog b/ChangeLog
index f0737b6..10a3167 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2024-08-14  Jacob Bachmeyer  <jcb@gnu.org>
+
+	Thanks to Hans-Peter Nilsson for reporting this issue.
+
+	* lib/target.exp (prune_warnings): Adjust patterns for messages
+	emitted by the GNU linker.  Older versions capitalized the message
+	stating the function that triggered the warning, while newer
+	versions do not.  DejaGnu now recognizes and removes both forms.
+
 2024-06-19  Jacob Bachmeyer  <jcb@gnu.org>
 
 	PR71624
diff --git a/lib/target.exp b/lib/target.exp
index 36ae639..784510c 100644
--- a/lib/target.exp
+++ b/lib/target.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 1992-2019, 2020 Free Software Foundation, Inc.
+# Copyright (C) 1992-2019, 2020, 2024 Free Software Foundation, Inc.
 #
 # This file is part of DejaGnu.
 #
@@ -265,12 +265,12 @@
     regsub -all "(^|\n)(\[^\n\]*: warning: \[^\n\]* is (often|almost always) misused, please use \[^\n\]*\n?)" $text "\\1" text
 
     # GNU ld warns about functions marked as dangerous in GNU libc.
-    regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*is dangerous\[^\n\]*" $text "" text
-    regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*the use of \[^\n\]* is dangerous, better use \[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*: \[Ii\]n function\[^\n\]*\n\[^\n\]\[^\n\]*is dangerous\[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*: \[Ii\]n function\[^\n\]*\n\[^\n\]\[^\n\]*the use of \[^\n\]* is dangerous, better use \[^\n\]*" $text "" text
     regsub -all "(^|\n)\[^\n\]*is dangerous\[^\n\]*" $text "" text
 
     # Libgloss libnosys defines functions that warn when linked in
-    regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*is not implemented and will always fail\[^\n\]*" $text "" text
+    regsub -all "(^|\n)\[^\n\]*: \[Ii\]n function\[^\n\]*\n\[^\n\]\[^\n\]*is not implemented and will always fail\[^\n\]*" $text "" text
     regsub -all "(^|\n)\[^\n\]*is not implemented and will always fail\[^\n\]*" $text "" text
 
     # libstdc++-v3 tests can emit cpplib warnings due to duplicate -isystem / -I flags