This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [patch/rfc/testsuite] Add "compiler_info"
- From: mec dot gnu at mindspring dot com (Michael Elizabeth Chastain)
- To: ac131313 at redhat dot com, gdb-patches at sources dot redhat dot com
- Date: Sun, 16 Nov 2003 11:08:05 -0500 (EST)
- Subject: Re: [patch/rfc/testsuite] Add "compiler_info"
Proofread and tested, no problems. I'm appending a little snippet
of test code. I tested with:
gcc 2.95.3 # reports gnuc-2-95
gcc 3.2-7-rh # reports gnuc-3-2
gcc 3.3.2 # reports gnuc-3-3
gcc gcc-3_3-branch # reports gnuc-3-3
gcc HEAD # reports gnuc-3-4
I didn't test the non-gcc path.
I prefer "gcc" to "gnuc" but "gnuc" is okay by me.
Recommended for approval.
Michael C
===
2003-11-14 Andrew Cagney <cagney@redhat.com>
* lib/gdb.exp (compiler_info): New global.
(test_compiler_info): New function.
(get_compiler_info): Set compiler_info.
* lib/compiler.c, lib/compiler.cc: Add copyright. When GNUC, set
"compiler_info".
===
global compiler_info
warning "compiler_info: ${compiler_info}"
if [test_compiler_info gnuc-2-*] {
warning "test_compiler_info: gnuc-2-*"
}
if [test_compiler_info gnuc-3-*] {
warning "test_compiler_info: gnuc-3-*"
}
if [test_compiler_info gnuc-3-2] {
warning "test_compiler_info: gnuc-3-2"
}
if [test_compiler_info gnuc-3-3] {
warning "test_compiler_info: gnuc-3-3"
}
if [test_compiler_info gnuc-3-4] {
warning "test_compiler_info: gnuc-3-4"
}