gcov: Respect triplet when looking for gcov
authorTorbjörn SVENSSON <torbjorn.svensson@foss.st.com>
Fri, 9 Sep 2022 10:19:27 +0000 (12:19 +0200)
committerMartin Liska <mliska@suse.cz>
Mon, 12 Sep 2022 09:42:09 +0000 (11:42 +0200)
When testing a cross toolchain outside the build tree, the binary name
for gcov is prefixed with the triplet.

gcc/testsuite/ChangeLog:

* g++.dg/gcov/gcov.exp: Respect triplet when looking for gcov.
* gcc.misc-tests/gcov.exp: Likewise.

Signed-off-by: Torbjörn SVENSSON <torbjorn.svensson@foss.st.com>
gcc/testsuite/g++.dg/gcov/gcov.exp
gcc/testsuite/gcc.misc-tests/gcov.exp

index 88acd95..04e7a01 100644 (file)
@@ -24,9 +24,9 @@ global GXX_UNDER_TEST
 
 # Find gcov in the same directory as $GXX_UNDER_TEST.
 if { ![is_remote host] && [string match "*/*" [lindex $GXX_UNDER_TEST 0]] } {
-    set GCOV [file dirname [lindex $GXX_UNDER_TEST 0]]/gcov
+    set GCOV [file dirname [lindex $GXX_UNDER_TEST 0]]/[transform gcov]
 } else {
-    set GCOV gcov
+    set GCOV [transform gcov]
 }
 
 # Initialize harness.
index 82376d9..b8e9661 100644 (file)
@@ -24,9 +24,9 @@ global GCC_UNDER_TEST
 
 # For now find gcov in the same directory as $GCC_UNDER_TEST.
 if { ![is_remote host] && [string match "*/*" [lindex $GCC_UNDER_TEST 0]] } {
-    set GCOV [file dirname [lindex $GCC_UNDER_TEST 0]]/gcov
+    set GCOV [file dirname [lindex $GCC_UNDER_TEST 0]]/[transform gcov]
 } else {
-    set GCOV gcov
+    set GCOV [transform gcov]
 }
 
 # Initialize harness.