diff mbox

RFA: Add libstdc++-v3 support for avr 5/7: libstdc++-v3 fix cross testing

Message ID CAMqJFCoH6JKRHAAQS6b9O1MbyLdkwz9KZ3TDwu3q_G47eHTY0g@mail.gmail.com
State New
Headers show

Commit Message

Joern Rennecke Oct. 21, 2014, 4:02 p.m. UTC
The gdb version check ends up trying to invoke gdb on the target -
not so nice if your target is too small to accomodate gdb in the first place.

I've added a check similar to the one in gdb-test to punt on non-native
targets.
libstdc++-v3:

2013-09-17  Joern Rennecke <joern.rennecke@embecosm.com>

	* testsuite/lib/gdb-test.exp (gdb_batch_check): Don't invoke
	gdb on cross targets.

Comments

Mike Stump Oct. 21, 2014, 5:51 p.m. UTC | #1
On Oct 21, 2014, at 9:02 AM, Joern Rennecke <joern.rennecke@embecosm.com> wrote:
> The gdb version check ends up trying to invoke gdb on the target -
> not so nice if your target is too small to accomodate gdb in the first place.

So, I didn’t see anything that allowed it to work on targets that have gdb and can work.  Turning it off unconditionally for all crosses seems wrong.

You could test to see if gdb is present (say, by running —version).  If present, assume this is as it should be.  If absent, just don’t test anything that requires gdb.  This works then in a native environment when gdb is absent, and crosses that can’t have a gdb for any reason.
diff mbox

Patch

Index: lib/gdb-test.exp
===================================================================
--- lib/gdb-test.exp	(revision 216243)
+++ lib/gdb-test.exp	(working copy)
@@ -229,6 +229,8 @@ 
 
 # Invoke gdb with a command and pattern-match the output.
 proc gdb_batch_check {command pattern} {
+    if { ![isnative] || [is_remote target] } { return 0 }
+
     set gdb_name $::env(GUALITY_GDB_NAME)
     set cmd "$gdb_name -nw -nx -quiet -batch -ex \"$command\""
     send_log "Spawning: $cmd\n"