This is the mail archive of the gdb-cvs@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] [testsuite] Pass pthreads in prepare_for_testing


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1daad298d699383bb4f35aa919a1acfa0ab8e16c

commit 1daad298d699383bb4f35aa919a1acfa0ab8e16c
Author: Yao Qi <yao.qi@linaro.org>
Date:   Wed Nov 22 16:50:53 2017 +0000

    [testsuite] Pass pthreads in prepare_for_testing
    
    "pthreads" in the right flag to pass in prepare_for_testing to linker,
    instead of additional_flags.  Without this patch, the test case can't be
    complied by clang.
    
    gdb compile failed, clang: warning: -lpthread: 'linker' input unused
    
    gdb/testsuite:
    
    2017-11-22  Yao Qi  <yao.qi@linaro.org>
    
    	* gdb.base/info-os.exp: Pass pthreads.
    	* gdb.multi/multi-attach.exp: Likewise.

Diff:
---
 gdb/testsuite/ChangeLog                  | 5 +++++
 gdb/testsuite/gdb.base/info-os.exp       | 2 +-
 gdb/testsuite/gdb.multi/multi-attach.exp | 2 +-
 3 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index 0bb2391..535cf1b 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -1,5 +1,10 @@
 2017-11-22  Yao Qi  <yao.qi@linaro.org>
 
+	* gdb.base/info-os.exp: Pass pthreads.
+	* gdb.multi/multi-attach.exp: Likewise.
+
+2017-11-22  Yao Qi  <yao.qi@linaro.org>
+
 	* gdb.dwarf2/pr10770.exp: Remove code skipping non-gcc
 	compiler.
 
diff --git a/gdb/testsuite/gdb.base/info-os.exp b/gdb/testsuite/gdb.base/info-os.exp
index 574da26..3267eec 100644
--- a/gdb/testsuite/gdb.base/info-os.exp
+++ b/gdb/testsuite/gdb.base/info-os.exp
@@ -28,7 +28,7 @@ if [gdb_skip_xml_test] then {
 }
 
 # Compile test program.
-if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-lpthread}] } {
+if { [prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}] } {
     fail "cannot compile test program"
     return -1
 }
diff --git a/gdb/testsuite/gdb.multi/multi-attach.exp b/gdb/testsuite/gdb.multi/multi-attach.exp
index 9397f85..0e54b4f 100644
--- a/gdb/testsuite/gdb.multi/multi-attach.exp
+++ b/gdb/testsuite/gdb.multi/multi-attach.exp
@@ -23,7 +23,7 @@ if {![can_spawn_for_attach]} {
     return 0
 }
 
-if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug additional_flags=-lpthread}]} {
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile {debug pthreads}]} {
     return -1
 }


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]