This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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"
}


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]