diff options
author | Ulrich Weigand <uweigand@de.ibm.com> | 2011-07-15 14:11:22 +0000 |
---|---|---|
committer | Ulrich Weigand <uweigand@de.ibm.com> | 2011-07-15 14:11:22 +0000 |
commit | 756d88a7fe366e16ca9239bf12550d6a643cfa19 (patch) | |
tree | 37af238eb29e07d49e4cbeb1c29e5053bfee6562 /gdb/testsuite/gdb.threads | |
parent | 31f83dc55a3f0040a82d078d780bcd3efb06c5b7 (diff) | |
download | fsf-binutils-gdb-756d88a7fe366e16ca9239bf12550d6a643cfa19.zip fsf-binutils-gdb-756d88a7fe366e16ca9239bf12550d6a643cfa19.tar.gz fsf-binutils-gdb-756d88a7fe366e16ca9239bf12550d6a643cfa19.tar.bz2 |
* lib/gdb.exp (gdb_compile_shlib_pthreads): New helper.
* gdb.threads/tls-shared.exp: Use it. Call gdb_load_shlibs.
Diffstat (limited to 'gdb/testsuite/gdb.threads')
-rw-r--r-- | gdb/testsuite/gdb.threads/tls-shared.exp | 46 |
1 files changed, 5 insertions, 41 deletions
diff --git a/gdb/testsuite/gdb.threads/tls-shared.exp b/gdb/testsuite/gdb.threads/tls-shared.exp index 5a46c8f..b82eebd 100644 --- a/gdb/testsuite/gdb.threads/tls-shared.exp +++ b/gdb/testsuite/gdb.threads/tls-shared.exp @@ -24,6 +24,8 @@ set testfile tls-main set libfile tls-shared set srcfile ${testfile}.c set binfile ${objdir}/${subdir}/${testfile} +set srcfile_lib ${libfile}.c +set binfile_lib ${objdir}/${subdir}/${libfile}.so remote_exec build "rm -f ${binfile}" @@ -32,48 +34,9 @@ if [get_compiler_info ${binfile}] { return -1 } -if { [gdb_compile_pthreads "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } { - return -1 -} - -# Build the shared libraries this test case needs. -# - -if {$gcc_compiled == 0} { - if [istarget "hppa*-hp-hpux*"] then { - set additional_flags "additional_flags=+z" - } elseif { [istarget "mips-sgi-irix*"] } { - # Disable SGI compiler's implicit -Dsgi - set additional_flags "additional_flags=-Usgi" - } else { - # don't know what the compiler is... - set additional_flags "" - } -} else { - if { ([istarget "powerpc*-*-aix*"] - || [istarget "rs6000*-*-aix*"]) } { - set additional_flags "" - } else { - set additional_flags "additional_flags=-fpic" - } -} - -set additional_flags "$additional_flags -shared" -if {[gdb_compile_pthreads "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.so" executable [list debug $additional_flags "incdir=${objdir}"]] != ""} { - return -1 -} - -if { ($gcc_compiled -&& ([istarget "powerpc*-*-aix*"] -|| [istarget "rs6000*-*-aix*"] )) } { - set additional_flags "additional_flags=-L${objdir}/${subdir}" -} elseif { [istarget "mips-sgi-irix*"] } { - set additional_flags "additional_flags=-rpath ${objdir}/${subdir}" -} else { - set additional_flags "" -} -if {[gdb_compile_pthreads "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.so" "${binfile}" executable [list debug $additional_flags]] != ""} { +if { [gdb_compile_shlib_pthreads ${srcdir}/${subdir}/${srcfile_lib} ${binfile_lib} {debug}] != "" + || [gdb_compile_pthreads ${srcdir}/${subdir}/${srcfile} ${binfile} executable [list debug shlib=${binfile_lib}]] != ""} { return -1 } @@ -82,6 +45,7 @@ gdb_exit gdb_start gdb_reinitialize_dir $srcdir/$subdir gdb_load ${binfile} +gdb_load_shlibs ${binfile_lib} if ![runto_main] then { fail "Can't run to main" |