diff options
Diffstat (limited to 'gdb/testsuite/lib/gdb.exp')
-rw-r--r-- | gdb/testsuite/lib/gdb.exp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index d221505..ebeb659 100644 --- a/gdb/testsuite/lib/gdb.exp +++ b/gdb/testsuite/lib/gdb.exp @@ -2809,12 +2809,19 @@ proc gdb_compile_pthreads {source dest type options} { } } -# 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" |