aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@broadcom.com>2013-12-10 17:04:17 +0000
committerAndrew Burgess <aburgess@broadcom.com>2013-12-10 17:04:17 +0000
commit409d8f4815b4c20916181d69d393f521ad1fb1e9 (patch)
treee892208945959ac556f0fa8486dd3d6c022811cd /gdb/testsuite
parentbae8a07ab1793e3c7d4e596906f4d4b87588935e (diff)
downloadgdb-409d8f4815b4c20916181d69d393f521ad1fb1e9.zip
gdb-409d8f4815b4c20916181d69d393f521ad1fb1e9.tar.gz
gdb-409d8f4815b4c20916181d69d393f521ad1fb1e9.tar.bz2
Add call to get_compiler_info to gdb_compile_shlib.
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.
Diffstat (limited to 'gdb/testsuite')
-rw-r--r--gdb/testsuite/ChangeLog5
-rw-r--r--gdb/testsuite/lib/gdb.exp11
2 files changed, 14 insertions, 2 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0e1e785..ec01bff 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+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
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"