From d1779be45e8c8963bcfda74b4903edb7b0eaff15 Mon Sep 17 00:00:00 2001 From: Paul Gilliam Date: Fri, 1 Apr 2005 18:43:22 +0000 Subject: [PATCH] * gdb.arch/altivec-abi.exp: Check for compiler and set use altivec' flag accordingly. * gdb.arch/altivec-regs.exp: Likewise. --- gdb/testsuite/ChangeLog | 6 ++++++ gdb/testsuite/gdb.arch/altivec-abi.exp | 17 ++++++++++++++++- gdb/testsuite/gdb.arch/altivec-regs.exp | 17 ++++++++++++++++- 3 files changed, 38 insertions(+), 2 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index 0e8dfdf2a34..769f54f78e3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2005-04-01 Paul Gilliam + + * gdb.arch/altivec-abi.exp: Check for compiler and set + use altivec' flag accordingly. + * gdb.arch/altivec-regs.exp: Likewise. + 2005-03-29 Daniel Jacobowitz * gdb.base/ptr-typedef.exp, gdb.base/ptr-typedef.c: New files. diff --git a/gdb/testsuite/gdb.arch/altivec-abi.exp b/gdb/testsuite/gdb.arch/altivec-abi.exp index 70fc3e01b21..6b22c9a20c5 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." } diff --git a/gdb/testsuite/gdb.arch/altivec-regs.exp b/gdb/testsuite/gdb.arch/altivec-regs.exp index fe8ec21ebcd..a1330d0a8d2 100644 --- a/gdb/testsuite/gdb.arch/altivec-regs.exp +++ b/gdb/testsuite/gdb.arch/altivec-regs.exp @@ -41,7 +41,22 @@ set testfile "altivec-regs" 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." } -- 2.30.2