This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: gcc/testsuite/lib/target-supports.exp
- From: Loren James Rittle <rittle at latour dot labs dot mot dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 25 Aug 2009 17:28:23 -0500 (CDT)
- Subject: PATCH: gcc/testsuite/lib/target-supports.exp
- Reply-to: rittle at labs dot mot dot com
So, I wondered why I saw "WARNING: program timed out." in recent test
results (e.g. http://gcc.gnu.org/ml/gcc-testresults/2009-08/msg02638.html).
It turns out that the setup for the test regarding --gc-sections is a
bit buggy when your -dumpspecs reports a *linker: line followed by an
e.g. *fbsd_dynamic_linker: line. In my case, the test framework was
attempting to execute: "/libexec/ld-elf.so.1 --help" (which apparently
hangs). It appears that "\*" is not correct to match a literal '*'.
It appears that one level of quoting is resolved in a quoted tcl
string before being passed as an argument to regsub.
Any comment on this analysis and the proposed fix?
Regards,
Loren
2009-08-25 Loren James Rittle <ljrittle@acm.org>
* lib/target-supports.exp (check_gc_sections_available):
Add proper pattern quote.
Index: gcc/testsuite/lib/target-supports.exp
===================================================================
--- gcc/testsuite/lib/target-supports.exp (revision 151094)
+++ gcc/testsuite/lib/target-supports.exp (working copy)
@@ -385,7 +385,7 @@
# Check if the ld used by gcc supports --gc-sections.
set gcc_spec [${tool}_target_compile "-dumpspecs" "" "none" ""]
- regsub ".*\n\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker
+ regsub ".*\n\\*linker:\[ \t\]*\n(\[^ \t\n\]*).*" "$gcc_spec" {\1} linker
set gcc_ld [lindex [${tool}_target_compile "-print-prog-name=$linker" "" "none" ""] 0]
set ld_output [remote_exec host "$gcc_ld" "--help"]
if { [ string first "--gc-sections" $ld_output ] >= 0 } {