aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.arch/altivec-abi.exp
diff options
context:
space:
mode:
authorPaul Gilliam <pgilliam@us.ibm.com>2005-04-01 18:43:22 +0000
committerPaul Gilliam <pgilliam@us.ibm.com>2005-04-01 18:43:22 +0000
commitd1779be45e8c8963bcfda74b4903edb7b0eaff15 (patch)
tree2835430f789c550904d5f46df1afde32b928cab4 /gdb/testsuite/gdb.arch/altivec-abi.exp
parent6128c599eda228149fba00fe9d06361dd3a8490c (diff)
downloadbinutils-d1779be45e8c8963bcfda74b4903edb7b0eaff15.zip
binutils-d1779be45e8c8963bcfda74b4903edb7b0eaff15.tar.gz
binutils-d1779be45e8c8963bcfda74b4903edb7b0eaff15.tar.bz2
* gdb.arch/altivec-abi.exp: Check for compiler and set
use altivec' flag accordingly. * gdb.arch/altivec-regs.exp: Likewise.
Diffstat (limited to 'gdb/testsuite/gdb.arch/altivec-abi.exp')
-rw-r--r--gdb/testsuite/gdb.arch/altivec-abi.exp17
1 files changed, 16 insertions, 1 deletions
diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp
index 70fc3e0..6b22c9a 100644
--- a/gdb/testsuite/gdb.arch/altivec-abi.exp
+++ b/gdb/testsuite/gdb.arch/altivec-abi.exp
@@ -41,7 +41,22 @@ set testfile "altivec-abi"
set binfile ${objdir}/${subdir}/${testfile}
set srcfile ${testfile}.c
-if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable {debug additional_flags=-w}] != "" } {
+set compile_flags {debug additional_flags=-w}
+if [get_compiler_info $binfile] {
+ warning "get_compiler failed"
+ return -1
+}
+
+if [test_compiler_info gcc*] {
+ set compile_flags "$compile_flags additional_flags=-maltivec"
+} elseif [test_compiler_info xlc*] {
+ set compile_flags "$compile_flags additional_flags=-qaltivec"
+} else {
+ warning "unknown compiler"
+ return -1
+}
+
+if { [gdb_compile ${srcdir}/${subdir}/${srcfile} ${binfile} executable $compile_flags] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}