[patch/testsuite/lib] compiler.c, compiler.cc: support old hp ansi c

Michael Elizabeth Chastain mec.gnu@mindspring.com
Thu Jul 1 02:16:00 GMT 2004


More HP cruft.  This old hp ansi c compiler, A.11.01.25171.gp,
does not define __HP_cc.  But it does define __HP_CXD_SPP.

__HP_CXD_SPP is not documented so I don't really know which
compilers it's defined in.  Bleagh.  But it's unlikely to cause any
side damage, with that __HP_ prefix.

Tested on:

  native i686-pc-linux-gnu, gcc 2.95.3 3.3.3 3.4.0, dwarf-2 stabs+
  native hppa2.0w-hp-hpux11.00, hp ansi c A.11.01.25171.GP,
    hp aC++ A.03.13

I will put this up for comment for 24 hours, in case somebody has
a better idea, and then commit it.

(My goal here is to run gdb 6.1.1 suite HEAD and gdb HEAD suite HEAD
 on native hppa2.0w-hp-hpux11.00 and have good comparable results).

Michael C

2004-06-30  Michael Chastain  <mec.gnu@mindspring.com>

	* lib/compiler.c: Accept __HP_CXD_SPP for old hp ansi c compiler.
	* lib/compiler.cc: Likewise.

Index: lib/compiler.c
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.c,v
retrieving revision 1.6
diff -c -3 -p -r1.6 compiler.c
*** lib/compiler.c	30 Jun 2004 08:01:33 -0000	1.6
--- lib/compiler.c	30 Jun 2004 17:57:15 -0000
*************** set compiler_info [join {gcc __GNUC__ __
*** 52,58 ****
--- 52,64 ----
  #endif
  #endif
  
+ #if defined (__HP_CXD_SPP)
+ /* older hp ansi c, such as A.11.01.25171.gp, defines this */
+ set compiler_info [join {hpcc __HP_CXD_SPP} -]
+ #endif
+ 
  #if defined (__HP_cc)
+ /* newer hp ansi c, such as B.11.11.28706.gp, defines this */
  set compiler_info [join {hpcc __HP_cc} -]
  #endif
  
Index: lib/compiler.cc
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/lib/compiler.cc,v
retrieving revision 1.8
diff -c -3 -p -r1.8 compiler.cc
*** lib/compiler.cc	30 Jun 2004 08:01:33 -0000	1.8
--- lib/compiler.cc	30 Jun 2004 17:57:15 -0000
*************** set compiler_info [join {gcc __GNUC__ __
*** 40,46 ****
--- 40,52 ----
  #endif
  #endif
  
+ #if defined (__HP_CXD_SPP)
+ /* older hp ansi c, such as A.11.01.25171.gp, defines this */
+ set compiler_info [join {hpcc __HP_CXD_SPP} -]
+ #endif
+ 
  #if defined (__HP_cc)
+ /* newer hp ansi c, such as B.11.11.28706.gp, defines this */
  set compiler_info [join {hpcc __HP_cc} -]
  #endif
  



More information about the Gdb-patches mailing list