summaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/gdb1555.exp
diff options
context:
space:
mode:
authorDaniel Jacobowitz <dan@debian.org>2006-06-22 20:30:55 +0000
committerDaniel Jacobowitz <dan@debian.org>2006-06-22 20:30:55 +0000
commit0b4509ca408cb116f1f2650cbce17b2c00939c57 (patch)
tree553d6a11e9567174772837fa5217b3fa1a3cf9c5 /gdb/testsuite/gdb.base/gdb1555.exp
parent2dfd8cd091fa0fa67b5997dfeec835e21e5b5e02 (diff)
downloadgdb-0b4509ca408cb116f1f2650cbce17b2c00939c57.tar.gz
Merge testsuite ERROR fixes from HEAD.gdb-csl-sourcerygxx-4_1-12
Diffstat (limited to 'gdb/testsuite/gdb.base/gdb1555.exp')
-rw-r--r--gdb/testsuite/gdb.base/gdb1555.exp56
1 files changed, 13 insertions, 43 deletions
diff --git a/gdb/testsuite/gdb.base/gdb1555.exp b/gdb/testsuite/gdb.base/gdb1555.exp
index 8bea6329160..f7cfe7560fb 100644
--- a/gdb/testsuite/gdb.base/gdb1555.exp
+++ b/gdb/testsuite/gdb.base/gdb1555.exp
@@ -30,59 +30,29 @@ set libfile gdb1555
set srcfile ${testfile}.c
set binfile ${objdir}/${subdir}/${testfile}
-remote_exec build "rm -f ${binfile}"
-
-# get the value of gcc_compiled
-if [get_compiler_info ${binfile}] {
- return -1
-}
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}.o" object {debug}] != "" } {
- return -1
-}
+set libsrc "${srcdir}/${subdir}/${libfile}.c"
+set libobj "${objdir}/${subdir}/${libfile}.so"
+set execsrc "${srcdir}/${subdir}/${srcfile}"
-# Build the shared libraries this test case needs.
-#
+remote_exec build "rm -f ${binfile}"
-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"
- }
+# Are we on a target board? No support for downloading shared libraries
+# to a target yet.
+if ![isnative] then {
+ return 0
}
-set additional_flags "$additional_flags -shared"
-if {[gdb_compile "${srcdir}/${subdir}/${libfile}.c" "${objdir}/${subdir}/${libfile}.so" executable [list debug $additional_flags "incdir=${objdir}"]] != ""} {
+# get the value of gcc_compiled
+if [get_compiler_info ${binfile}] {
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 "${objdir}/${subdir}/${testfile}.o ${objdir}/${subdir}/${libfile}.so" "${binfile}" executable [list debug $additional_flags]] != ""} {
+if { [gdb_compile_shlib $libsrc $libobj {debug}] != ""
+ || [gdb_compile $execsrc ${binfile} executable \
+ [list debug shlib=${libobj}]] != "" } {
return -1
}
-
gdb_exit
gdb_start
gdb_reinitialize_dir $srcdir/$subdir