This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
[patch/testsuite/cp] m-static.exp: compile one file at a time
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: carlton at kealia dot com, gdb-patches at sources dot redhat dot com
- Date: Tue, 6 Jan 2004 14:20:40 -0500 (EST)
- Subject: [patch/testsuite/cp] m-static.exp: compile one file at a time
All the world is not gcc:
% aCC -c foo.c bar.c
foo.c:
bar.c:
%
gdb_compile thinks these are error messages.
It's necessary to compile one file at a time.
Tested on:
native i686-pc-linux-gnu, gcc
hppa2.0-hp-hpux11.11+ansic, hp-ux ansi-c and hp-ux aCC
I am committing this now.
Michael C
2004-01-06 Michael Chastain <mec.gnu@mindspring.com>
* gdb.cp/m-static.exp: Compile one source file at a time.
Delete unused call to get_compiler_info.
Index: m-static.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.cp/m-static.exp,v
retrieving revision 1.1
diff -c -3 -p -r1.1 m-static.exp
*** m-static.exp 23 Aug 2003 03:55:59 -0000 1.1
--- m-static.exp 6 Jan 2004 18:54:08 -0000
***************
*** 1,4 ****
! # Copyright 2002 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
--- 1,4 ----
! # Copyright 2002, 2004 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
*************** set prms_id 0
*** 33,48 ****
set bug_id 0
set testfile "m-static"
! set srcfile ${testfile}.cc
! set srcfile1 ${testfile}1.cc
! set binfile ${objdir}/${subdir}/${testfile}
! if { [gdb_compile "${srcdir}/${subdir}/${srcfile} ${srcdir}/${subdir}/${srcfile1}" "${binfile}" executable {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
! if [get_compiler_info ${binfile} "c++"] {
! return -1
}
gdb_exit
--- 33,54 ----
set bug_id 0
set testfile "m-static"
! set srcfile "${srcdir}/${subdir}/${testfile}.cc"
! set srcfile1 "${srcdir}/${subdir}/${testfile}1.cc"
! set objfile "${objdir}/${subdir}/${testfile}.o"
! set objfile1 "${objdir}/${subdir}/${testfile}1.o"
! set binfile "${objdir}/${subdir}/${testfile}"
! if { [gdb_compile "${srcfile}" "${objfile}" object {debug c++}] != "" } {
gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
! if { [gdb_compile "${srcfile1}" "${objfile1}" object {debug c++}] != "" } {
! gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
! }
!
! if { [gdb_compile "${objfile} ${objfile1}" "${binfile}" executable {debug c++}] != "" } {
! gdb_suppress_entire_file "Testcase compile failed, so all tests in this file will automatically fail."
}
gdb_exit