https://sourceware.org/ml/gdb-patches/2013-12/msg00374.html
gdb/testsuite/ChangeLog
* lib/gdb.exp (gdb_compile_shlib): Add call to get_compiler_info,
update comment.
+2013-12-10 Andrew Burgess <aburgess@broadcom.com>
+
+ * lib/gdb.exp (gdb_compile_shlib): Add call to get_compiler_info,
+ update comment.
+
2013-12-10 Joel Brobecker <brobecker@adacore.com>
* gdb.ada/int_deref.exp: Add test verifying that we print
}
}
-# Build a shared library from SOURCES. You must use get_compiler_info
-# first.
+# Build a shared library from SOURCES.
proc gdb_compile_shlib {sources dest options} {
set obj_options $options
+ set info_options ""
+ if { [lsearch -exact $options "c++"] >= 0 } {
+ set info_options "c++"
+ }
+ if [get_compiler_info ${info_options}] {
+ return -1
+ }
+
switch -glob [test_compiler_info] {
"xlc-*" {
lappend obj_options "additional_flags=-qpic"