[testsuite] Pass -lpthread in libs
Commit Message
"libs" is the right flag to pass a library to a 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-17 Yao Qi <yao.qi@linaro.org>
* gdb.base/info-os.exp: Pass -lpthread in libs.
* gdb.multi/multi-attach.exp: Likewise.
---
gdb/testsuite/gdb.base/info-os.exp | 2 +-
gdb/testsuite/gdb.multi/multi-attach.exp | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
@@ -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 libs=-lpthread}] } {
fail "cannot compile test program"
return -1
}
@@ -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 libs=-lpthread}]} {
return -1
}