summaryrefslogtreecommitdiffstats
path: root/gdb/testsuite/gdb.threads/schedlock.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <drow@false.org>2003-01-04 23:05:05 +0000
committerDaniel Jacobowitz <drow@false.org>2003-01-04 23:05:05 +0000
commitb5ab8ff3a405de207d647b0fd0a3346939c8042e (patch)
treeca60b64461ba4decd20316b12ecc94be8528b9d0 /gdb/testsuite/gdb.threads/schedlock.exp
parentff2d781336965fc130fa7deaa00efb635d95af43 (diff)
downloadppe42-binutils-b5ab8ff3a405de207d647b0fd0a3346939c8042e.tar.gz
ppe42-binutils-b5ab8ff3a405de207d647b0fd0a3346939c8042e.zip
Fix PR gdb/844
* lib/gdb.exp (gdb_compile): Handle "quiet" option. (gdb_compile_pthreads): Pass "quiet" to gdb_compile. * gdb.threads/gcore-thread.exp: Use gdb_compile_pthreads. Return instead of calling gdb_suppress_entire_file. * gdb.threads/print-threads.exp: Likewise. * gdb.threads/schedlock.exp: Likewise. * gdb.threads/killed.exp: Return instead of calling gdb_suppress_entire_file. * gdb.threads/linux-dp.exp: Likewise. * gdb.threads/pthreads.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.threads/schedlock.exp')
-rw-r--r--gdb/testsuite/gdb.threads/schedlock.exp36
1 files changed, 1 insertions, 35 deletions
diff --git a/gdb/testsuite/gdb.threads/schedlock.exp b/gdb/testsuite/gdb.threads/schedlock.exp
index 2f0be4bc34..28298c684a 100644
--- a/gdb/testsuite/gdb.threads/schedlock.exp
+++ b/gdb/testsuite/gdb.threads/schedlock.exp
@@ -33,41 +33,7 @@ set testfile "schedlock"
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-set built_binfile 0
-
-# Default to the usual (only?) -lpthread on GNU/Linux to quiet noise
-if [istarget "*-*-linux*"] then {
- set possible_libs "-lpthread -lpthreads -lthread"
-} else {
- set possible_libs "-lpthreads -lpthread -lthread"
-}
-
-set why_msg "unrecognized error"
-foreach lib $possible_libs {
- set options "debug"
- lappend options "incdir=${objdir}"
- lappend options "libs=$lib"
- set ccout [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable $options]
- switch -regexp -- $ccout {
- ".*no posix threads support.*" {
- set why_msg "missing threads include file"
- break
- }
- ".*cannot open -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- ".*Can't find library for -lpthread.*" {
- set why_msg "missing runtime threads library"
- }
- {^$} {
- pass "successfully compiled posix threads test case"
- set built_binfile 1
- break
- }
- }
-}
-if {$built_binfile == "0"} {
- unsupported "Couldn't compile ${srcfile}, ${why_msg}"
+if {[gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug "incdir=${objdir}"]] != "" } {
return -1
}
OpenPOWER on IntegriCloud