aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/lib
diff options
context:
space:
mode:
authorPierre Muller <muller@sourceware.org>2009-10-02 21:28:34 +0000
committerPierre Muller <muller@sourceware.org>2009-10-02 21:28:34 +0000
commitace5c364a5a301526d3e97b1b291496d510a600f (patch)
tree3e26f63e51f9b0be4a77cf72f0520c7c5f9baca4 /gdb/testsuite/lib
parentf98fa5342446a05a11d8993c48906f8eb858a1d3 (diff)
downloadgdb-ace5c364a5a301526d3e97b1b291496d510a600f.zip
gdb-ace5c364a5a301526d3e97b1b291496d510a600f.tar.gz
gdb-ace5c364a5a301526d3e97b1b291496d510a600f.tar.bz2
* lib/gdb.exp (gdb_compile): Avoid adding
gdb_saved_unbuffered_mode_obj if -nostdlib option is used.
Diffstat (limited to 'gdb/testsuite/lib')
-rw-r--r--gdb/testsuite/lib/gdb.exp6
1 files changed, 5 insertions, 1 deletions
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index 0c93a73..af69c68 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -1824,7 +1824,11 @@ proc gdb_compile {source dest type options} {
# reverse link order. In that case, we can use ldflags to
# avoid copying the object file to the host multiple
# times.
- lappend options "ldflags=$gdb_saved_set_unbuffered_mode_obj"
+ # This object can only be added if standard libraries are
+ # used. Thus, we need to disable it if -nostdlib option is used
+ if {[lsearch -regexp $options "-nostdlib"] < 0 } {
+ lappend options "ldflags=$gdb_saved_set_unbuffered_mode_obj"
+ }
}
}