From ace5c364a5a301526d3e97b1b291496d510a600f Mon Sep 17 00:00:00 2001 From: Pierre Muller Date: Fri, 2 Oct 2009 21:28:34 +0000 Subject: [PATCH] * lib/gdb.exp (gdb_compile): Avoid adding gdb_saved_unbuffered_mode_obj if -nostdlib option is used. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/lib/gdb.exp | 6 +++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 2f4799ea921..957cf90dfb8 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2009-10-02 Pierre Muller + Pedro Alves + + * lib/gdb.exp (gdb_compile): Avoid adding + gdb_saved_unbuffered_mode_obj if -nostdlib option is used. + 2009-10-01 Pierre Muller * src/gdb/testsuite/gdb.base/shr1.c: Use %p in format string. diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp index 0c93a73db6b..af69c68aa3a 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" + } } } -- 2.30.2