* lib/gdb.exp (build_executable): Forward "c++" option to
authorDoug Evans <dje@google.com>
Fri, 30 Jul 2010 19:59:42 +0000 (19:59 +0000)
committerDoug Evans <dje@google.com>
Fri, 30 Jul 2010 19:59:42 +0000 (19:59 +0000)
get_compiler_info.

gdb/testsuite/ChangeLog
gdb/testsuite/lib/gdb.exp

index 1332407e1666c246f9d75d477328c3e9d0a8e477..183b277e8082eb094cb5be66c0c7231361b4e6c7 100644 (file)
@@ -1,5 +1,8 @@
 2010-07-30  Doug Evans  <dje@google.com>
 
+       * lib/gdb.exp (build_executable): Forward "c++" option to
+       get_compiler_info.
+
        * gdb.python/py-type.exp (test_template): Mark as xfail tests
        "python print ttype.template_argument(1)" and
        "python print isinstance(ttype.template_argument(1), gdb.Value)"
index 04e00e2007f98f4cad2b83c52f98ab7790580370..ce179b25f4ef153e791f036f8ff05e18bb8633b6 100644 (file)
@@ -3257,7 +3257,11 @@ proc build_executable { testname executable {sources ""} {options {debug}} } {
         return -1
     }
 
-    if [get_compiler_info ${binfile}] {
+    set info_options ""
+    if { [lsearch -exact $options "c++"] >= 0 } {
+       set info_options "c++"
+    }
+    if [get_compiler_info ${binfile} ${info_options}] {
         return -1
     }
     return 0