* lib/gdb.exp (get_compiler_info): Use -E -o in remote-host case.
authorJoseph Myers <joseph@codesourcery.com>
Wed, 22 Apr 2009 19:46:19 +0000 (19:46 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Wed, 22 Apr 2009 19:46:19 +0000 (19:46 +0000)
gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index ddac7cad2c13ca0e35396d81706def293ca1d34a..1bb8743c8a8f371aa15e836602cc84ed4011991f 100644 (file)
@@ -1,3 +1,7 @@
+2009-04-22  Joseph Myers  <joseph@codesourcery.com>
+
+       * lib/gdb.exp (get_compiler_info): Use -E -o in remote-host case.
+
 2009-04-15  Tom Tromey  <tromey@redhat.com>
 
        * gdb.base/charset.exp: Add regression test.
index 8b8e7c6d6bbc6bc590d5f0f6be8809ba4782489e..6f7c35154c5977eba18e6ee52fd010021bc1d6fe 100644 (file)
@@ -1539,7 +1539,17 @@ proc get_compiler_info {binfile args} {
     # Run $ifile through the right preprocessor.
     # Toggle gdb.log to keep the compiler output out of the log.
     log_file
-    set cppout [ gdb_compile "${ifile}" "" preprocess [list "$args" quiet] ]
+    if [is_remote host] {
+       # We have to use -E and -o together, despite the comments
+       # above, because of how DejaGnu handles remote host testing.
+       set ppout "$outdir/compiler.i"
+       gdb_compile "${ifile}" "$ppout" preprocess [list "$args" quiet]
+       set file [open $ppout r]
+       set cppout [read $file]
+       close $file
+    } else {
+       set cppout [ gdb_compile "${ifile}" "" preprocess [list "$args" quiet] ]
+    }
     log_file -a "$outdir/$tool.log" 
 
     # Eval the output.
This page took 0.040301 seconds and 4 git commands to generate.