[testsuite] Pass pthreads in prepare_for_testing
authorYao Qi <yao.qi@linaro.org>
Wed, 22 Nov 2017 16:50:53 +0000 (16:50 +0000)
committerYao Qi <yao.qi@linaro.org>
Wed, 22 Nov 2017 16:50:53 +0000 (16:50 +0000)
"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.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/info-os.exp
gdb/testsuite/gdb.multi/multi-attach.exp

index 0bb2391924cb263f3ccdad6763bb09e42d15a445..535cf1bf2e0d5078202a87548b31252cf74dce44 100644 (file)
@@ -1,3 +1,8 @@
+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
index 574da26c331ac1265be4eb7224f760b57185c638..3267eec9dae08434ea6dd437aa515dfc223e97e6 100644 (file)
@@ -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
 }
index 9397f8529728bca468948c880aacdd2796655060..0e54b4fa52d55fa10f3e3f221d35190dc9af430c 100644 (file)
@@ -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
 }