aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog10
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp12
-rw-r--r--gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp22
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp10
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp10
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp10
-rw-r--r--gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp10
7 files changed, 81 insertions, 3 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index dceae82..cffe6fa 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -7,6 +7,16 @@
Thu Dec 20 09:54:36 2001 Jeffrey A Law (law@redhat.com)
+ * gdb.hp/gdb.defects/bs15503.exp: Only run this test if compiling
+ with HP's compiler.
+ * gdb.hp/gdb.objdbg/objdbg01.exp: Likewise.
+ * gdb.hp/gdb.objdbg/objdbg02.exp: Likewise.
+ * gdb.hp/gdb.objdbg/objdbg03.exp: Likewise.
+ * gdb.hp/gdb.objdbg/objdbg04.exp: Likewise.
+
+ * gdb.hp/gdb.defects/solib-d.exp: Update to handle building with
+ either HP's compilers or GCC.
+
* gdb.hp/gdb.base-hp/hwwatchbus.exp: Allow inferior to get either
a SIGBUS or SIGSEGV.
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
index cb496a2..ef24951 100644
--- a/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
+++ b/gdb/testsuite/gdb.hp/gdb.defects/bs15503.exp
@@ -27,6 +27,18 @@ set testfile "bs15503"
set srcfile ${testfile}.cc
set binfile ${objdir}/${subdir}/${testfile}
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+# The testcode is non-conforming and rejected by GCC. So bypass this
+# test completely unless we're compiling with HP's compiler.
+if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+ return 0
+}
+
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable "debug c++"] != "" } {
perror "Couldn't compile ${srcfile}"
return -1
diff --git a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
index 81d8bda..c0d2067 100644
--- a/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
+++ b/gdb/testsuite/gdb.hp/gdb.defects/solib-d.exp
@@ -75,16 +75,32 @@ set testfile2 ${objdir}/${subdir}/${testfile}2.o
set libfile1 ${objdir}/${subdir}/${testfile}1.sl
set libfile2 ${objdir}/${subdir}/${testfile}2.sl
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1;
+}
+
+# set up appropriate compile option to recognize long double
+if {$hp_aCC_compiler || $hp_cc_compiler} {
+ set picflag "+z"
+ set ansiflag "-Ae"
+} else {
+ set picflag "-fpic"
+ set ansiflag ""
+}
+
+
# Build the shared libraries this test case needs.
#
#cd ${subdir}
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object {debug additional_flags=+z}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}1.c" "${testfile1}" object "{debug additional_flags=${picflag}}"] != "" } {
perror "Couldn't compile ${testfile}1.c"
return -1
}
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object {debug additional_flags=+z}] != ""} {
+if { [gdb_compile "${srcdir}/${subdir}/${testfile}2.c" "${testfile2}" object "{debug additional_flags=${picflag}}"] != ""} {
perror "Couldn't compile ${testfile}2.c"
return -1
}
@@ -94,7 +110,7 @@ remote_exec build "ld -b ${testfile2} -o ${libfile2}"
# Build the test case
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable {debug additional_flags=-Ae -Wl,-aarchive}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${libfile1} ${libfile2}" "${binfile}" executable "{debug additional_flags=${ansiflag} -Wl,-aarchive}"] != "" } {
perror "Couldn't build ${binfile}"
return -1
}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
index 2feed4b..70d9d0c 100644
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg01.exp
@@ -14,6 +14,16 @@ set objdbgdir ${objdir}/${subdir}/objdbg01
set binfile ${objdbgdir}/${testfile}
set symaddrfile ${toolssubdir}/symaddr
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+ return 0
+}
+
if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
index 7a7e57a..fcd0fdc 100644
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg02.exp
@@ -13,6 +13,16 @@ set objdbgdir ${objdir}/${subdir}/objdbg02
set binfile ${objdbgdir}/${testfile}
set toolssubdir ${srcdir}/${subdir}/tools
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+ return 0
+}
+
if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
index baaa02a..1e54947 100644
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg03.exp
@@ -18,6 +18,16 @@ if [istarget "hppa64-*-*"] {
set symaddrfile ${toolssubdir}/symaddr
}
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+ return 0
+}
+
if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
}
diff --git a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
index f678274..c57f4c0 100644
--- a/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
+++ b/gdb/testsuite/gdb.hp/gdb.objdbg/objdbg04.exp
@@ -14,6 +14,16 @@ set binfile ${objdbgdir}/${testfile}
set toolssubdir ${srcdir}/${subdir}/tools
set symaddrfile ${toolssubdir}/symaddr
+# Create and source the file that provides information about the compiler
+# used to compile the test case.
+if [get_compiler_info ${binfile}] {
+ return -1
+}
+
+if {!$hp_aCC_compiler && !$hp_cc_compiler} {
+ return 0
+}
+
if { [gdb_compile "${toolssubdir}/test-objdbg.cc" "${objdbgdir}/test-objdbg.o" object "debug c++ {additional_flags=-I${toolssubdir} +objdebug}"] != "" } {
gdb_suppress_entire_file "WARNING: +objdebug option is not supported in this compiler version, test ignored."
}